Search code examples
pythonmapsfolium

Python folium map developement


I am trying to build a map on python and i am using the folium library.I can see the map on my browser when it is only:

import folium
map = folium.Map(location=[25.747608, 89.268044])
map.save("Map2.html")

When i add two more parameters like (tiles="Mapbox Bright") and (zoom_start=6) my code looks like this and the map does not work :

import folium
map = folium.Map(location=[25.747608, 89.268044], zoom_start=6, tiles="Mapbox Bright")
map.save("Map2.html")
    

What can i do with my code so that i see the map in my browser


Solution

  • I've just tried it too, neither the Mapbox Bright or Mapbox Control Room tiles seem to work, I don't think they're supported anymore. Try any of the other tiles or don't specify a tile parameter and it should work fine.

    Here's a list of available tiles: https://leaflet-extras.github.io/leaflet-providers/preview/