I have what I believe is a basic use case. I have one (for the time being) object that is moving (could be a car … mine is flying).
I would like to plot its position on a map (I am currently using streamlit-folium but I could use whatever other component)
I have a loop modifying the position of the marker (object) … but it does not move. If I move st_data = st_folium(m, width=800, height=500) inside the loop it’s like plotting different map for each iteration (with the marker moving) but that is very slow (and I dont want multiple map)
OR, you just happened to post this during the Snowflake Summit, and employees were less available to answer questions
I’m not sure this is a great use case for Folium, as you necessarily are going to have to re-draw the map (if I’m understanding correctly). Folium only takes in a static dataset, not a websocket or similar, so there’s no way to tell the map that new data arrived but not to re-draw the scene.
Hope you had a nice time with your colleagues
There is may be a go in between we can imagine to have some layers with static data (no nee to redraw them) and some with only the moving object which need to be redrawn.
Or may be the best solution is to wait for ipywidgets to be available in Streamlit and use ipyleaflet that should enable bi directional communication.
Any advice?
Thanks
Guillaume
PS: While waiting what about redrawing everything at each iteration. Can it be a temporary solution ?