Skip to content

How to save map state? #117

Answered by giswqs
swdmike asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, that's limitation of folium. Each map is essentially an HTML file. It does not have functionality for adding or removing layers once a map is displayed. It is a one-way street. Once the map is created, it is a done deal. No way back.

You might try the st.pydeck_chart. I believe it allows adding/removing layers without recreating the map, but it does not have the rich functionality that leafmap has.
https://docs.streamlit.io/library/api-reference/charts/st.pydeck_chart

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by giswqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants