Python Forum

Full Version: How can draw a real-time marker on map using folium/leaflet Jupyter notebook
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to move a marker in real time inside a map using Folium and Jupyter notebook. I've tried the following but doesn't work

Quote:[inline]for x in range (len(loc_225)):
folium.Marker([loc_225.values[x,0]/10000000,loc_225.values[x,1]/10000000], popup='225',icon=folium.Icon(color='red', icon='map-marker')).add_to(m)
folium.Marker([loc_324.values[x,0]/10000000,loc_324.values[x,1]/10000000], popup='324',icon=folium.Icon(color='blue', icon='map-marker')).add_to(m)
m
sleep(2.5)[/inline]
Is it possible with folium?

Also, I've tried with leaflet, but same result.

Quote:[inline]for x in range (len(lat_225)):
marker_next = lf.Marker(location=[lat_225['message_basicContainer_reference_position_latitude'].values[x]/10000000,lon_225['message_basicContainer_reference_position_longitude'].values[x]/10000000])
m += marker_next
sleep(0.5)
m[/inline]