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 ?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.