To use maps, you need to obtain and install either a Google Maps or MapBox api key before maps can be used. See Using Google Maps and OpenStreetMaps Tiles with StreamLab below for more information. The Map and Table dashboard displays two frames:
You can remove or add panels through the Dashboards menu, available by clicking the SQLstream icon in the upper right corner of the panel). You can also rearrange the panels' layout.
By default, the Map panel is generated as an World Events map visualization panel.
You can also switch to the Pan and Zoom map, which offers a wider range of options than the World Events visualization panel.
To generate a Map and Table dashboard:
Select the Map and Table tab in the Custom Dashboard commands.
Select columns for Latitude and Longitude. In order for the map to work properly, you need to verify that these columns map to real-world locations (the person managing your data should be able to verify this for you).
Select a column for Value. This text appears when you mouse over an event on the map.
Select a column for ID. StreamLab uses the id column to group associated events.
If desired, select a column for Key. You can use this to color-code events in the Pan and Zoom map.
Click the + icon to add the suggestion to the Script.
Click the Dashboard icon in the script. The icon appears red for custom dashboards.
The Map and Table dashboard opens.
Once the dashboard opens, you can modify it with panel preferences or by modifying the layout.
The Pan & Zoom Map visualization panel offers a wider range of options than the World Events visualization panel.
To switch to the Pan & Zoom Map visualization pane:
Preferences include:
To use maps, you need to obtain and install either a Google Maps or MapBox api key before maps can be used.
If you are using the the Pan and Zoom map visualization, StreamLab and s-Dashboard require a Google Maps API key. To retrieve an API key, please visit the following link: https://developers.google.com/maps/documentation/javascript/tutorial#api_key.
Once you have a Google Maps API key, you need to restart StreamLab to incorporate it. To do so when launching StreamLab from the command line, use a -m flag, as in:
-m google:AGzaSyrDBVfuWtaa40S1pM8U-0YED3ONjvq6-7mFZ
To do so when launching StreamLab using the ‘Start Streamlab Server’ icon, right-click on the desktop ‘Start Streamlab Server’ icon, select Properties, and add the -m option to the end of the command.
You can now use the Pan and Zoom map visualization with full functionality.
To use OpenStreetMaps tiles, you need a Mapbox id. To design a map, go to https://www.mapbox.com/ and sign up and design the map they want.
Each map has a map id. This gets used in the -m option preceded by ‘mapbox:’, as in:
-m mapbox:myserver.jeo4y40c
All StreamLab maps will use the same tile set. In order to use a different tile set, you need to restart StreamLab with a different Mapbox id.
You can also set the map service in /etc/default/streamlabd, by setting STREAMLAB_MAP_SERVICE to ‘google:’ or ‘mapbox:’.