I would like to print some information in popups after a click event in a folium marker. Creating an app by following dynamic_updates.py example from streamlit-folium official repo I was able to do that. However, a weird behavior happens, when I click in the marker the popup shows and disappear after 1 second. Could someone help me to solve this problem? Any suggestion @randyzwitch?
Thanks in advance!
Hi Wagner, welcome to our community! It’s great to have you here!
Could you please provide a link to your code?
Hello @Charly_Wargnier thanks to kind reception!
I used the example of official streamlit-folium documentation: dynamic_updates.py
I found a solution, I do not know if it is the better, but I replace the folium markers section by the following code:
for capital in capitals.itertuples():
if capital.state == st.session_state["selected_state"]
Seems to fix the error. However, the map is rerender.
Nice workaround! Glad you found a fix!