Reputation: 11
This is what I have so far:
import folium
m = folium.Map(
location=[43.761539, -79.411079],
tiles="Stamen Toner",
zoom_start=11
)
m.save("index.html")
folium.GeoJson("file.geojson").add_to(m)
m
Up until the folium.GeoJson
... line the map shows up but the overlay makes nothing render
Upvotes: 1
Views: 2115
Reputation: 8913
You need to add a LayerControl()
:
import folium
m = folium.Map(
location=[43.761539, -79.411079],
tiles="Stamen Toner",
zoom_start=11
)
folium.GeoJson("file.geojson", name="geojson").add_to(m)
folium.LayerControl().add_to(m)
m.save("index.html")
m
Upvotes: 2