How to set mapbox api url for folium
Feb 26, 2021
Steps of how to set tiles for folium described here since there seem no detailed instructions and folium requested passing via api for Mapbox maps.
Steps
- Go to Mapbox Studio
- Create a “New Style”, choose a template and variant
- adjust the settings you want, then click “share” on the top right corner
- Switch to “Third party” and select for “Fulcrum”. Then just copy the link
5. Paste to parameter “tiles” like
map = folium.Map(location=[51.163361, 10.447683], zoom_start=6, tiles='https://api.mapbox.com/styles/v1/username/referencecode/tiles/256/{z}/{x}/{y}@2x?access_token=pk.xxxx', attr='Mapbox Light')
and the map looks like