Skip to content

How to access user_rois in the leafmap.Map class? #152

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

You must be logged in to vote

Unfortunately, m.user_rois won't work with streamlit. It is a one-way street. Once the the map is converted to html (m_to_streamlit()) and displayed in streamlit, all the bi-directional communication is gone. Whatever you do with the map in streamlit can't communicate back to python. The only workaround is to use the folium draw_export plugin to manually export the drawn geometries as a geojson and import it back to the app, just like what is implemented in https://github.com/giswqs/streamlit-geospatial.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@tikitong
Comment options

@giswqs
Comment options

@tikitong
Comment options

Answer selected by giswqs
Comment options

You must be logged in to vote
3 replies
@giswqs
Comment options

@gomesdaciel
Comment options

@giswqs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants