TrackMap Panel for Grafana
A panel for Grafana that visualizes GPS points as a line on an interactive map.
- Places a dot on the map at the current time as you mouse over other panels.
- Zoom to a range of points by drawing a box by shift-clicking and dragging.
- Multiple map backgrounds: OpenStreetMap, OpenTopoMap, and Satellite imagery.
- Track and dot colors can be customized in the options tab.
The most current version can be installed via Grafana's plugin repository at https://grafana.com/grafana/plugins/pr0ps-trackmap-panel
Releases are also provided as zip files at https://github.com/pR0Ps/grafana-trackmap-panel/releases. See https://grafana.com/docs/grafana/latest/plugins/installation for help with installing them.
Once installed you should be able to select the "TrackMap" panel when adding a new panel to a Grafana dashboard.
Building from source
To use an unreleased version of the plugin or do development, you will need to manually build it from source.
To build, install npm, check out the master branch (or the commit you want to build) and run the following commands in the plugin's directory:
npm install npm run build
This will build the currently checked out source into the
dist folder for Grafana to use.
The plugin requires latitude and longitude measurements provided as floats in two separate fields formatted by Grafana as a "Time series". The order of the data returned by the query is required (latitude, then longitude) since the labels and tag names are not used.
For example, the following query has been tested using InfluxDB as a data source in the case where
longitude series are stored in the
SELECT median("latitude"), median("longitude") FROM "location" WHERE $timeFilter GROUP BY time($interval)
Because the plugin only cares about getting 2 series of data, it's also possible to use MySQL/MariaDB as a data source by using 2 queries like so:
A: SELECT "latitude" as value, $__time(timestamp) FROM "location" WHERE $__timeFilter(timestamp) ORDER BY timestamp ASC B: SELECT "longitude" as value, $__time(timestamp) FROM "location" WHERE $__timeFilter(timestamp) ORDER BY timestamp ASC
Installing TrackMap on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Panel
Use the grafana-cli tool to install TrackMap from the commandline:
grafana-cli plugins install
The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins. More information on the cli tool.
Alternatively, you can manually download the .zip file for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Add the Panel to a Dashboard
Installed panels are available immediately in the Dashboards section in your Grafana main menu, and can be added like any other core panel in Grafana.
To see a list of installed panels, click the Plugins item in the main menu. Both core panels and installed panels will appear.