Python Forum
How can draw a real-time marker on map using folium/leaflet Jupyter notebook - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: How can draw a real-time marker on map using folium/leaflet Jupyter notebook (/thread-31615.html)



How can draw a real-time marker on map using folium/leaflet Jupyter notebook - C3PO - Dec-22-2020

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]