Why does add_child method does not work in my geo-mapping code using folium library?

1.4k Views Asked by At

I was trying to create a map using OSM and the following code was working fine until I used the add_child method.

import folium

map=folium.Map(location=[38.58,-99.09],zoom_start=6, tiles= "Mapbox Bright")
fg= folium.FeatureGroup(name="My Map")
fg.add_child(folium.Marker(location=[38,-99], popup="Hi, I'm a marker", icon=folium.Icon(color='green')))
map.add_child(fg)
map.save("Map0.html")

Thanks, in advance!!

0

There are 0 best solutions below