Using Google Maps and OpenStreetMaps Tiles with StreamLab

<< Click to Display Table of Contents >>

Navigation:  Using StreamLab > StreamLab Overview > Running StreamLab >

Using Google Maps and OpenStreetMaps Tiles with StreamLab

Previous pageReturn to chapter overviewNext page

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.

Using StreamLab with OpenStreetMaps

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.

Setting Map Service in Environment

You can also set the map service in /etc/default/streamlabd, by setting STREAMLAB_MAP_SERVICE to 'google:<key>' or 'mapbox:<key>'.