Streamlit + linked_maps
patel-zeel opened this issue · 1 comments
patel-zeel commented
Description
The linked_maps
functionality does not seem to work yet in Streamlit.
Source code
The code that works in Jupyter notebook:
import leafmap.leafmap as leafmap
layers = ["Esri.WorldTopoMap", "OpenTopoMap"]
leafmap.linked_maps(rows=1, cols=2, height="400px", layers=layers)
The code I tried in streamlit:
import leafmap.foliumap as leafmap
layers = ["Esri.WorldTopoMap", "OpenTopoMap"]
leafmap.linked_maps(rows=1, cols=2, height="400px", layers=layers)
Error trace:
File "/home/patel_zeel/Mean_NDVI/small_app.py", line 4, in <module>
leafmap.linked_maps(rows=1, cols=2, height="400px", layers=layers)
File "/opt/anaconda3/envs/zeel_py310/lib/python3.10/site-packages/leafmap/foliumap.py", line 3506, in linked_maps
raise NotImplementedError(
NotImplementedError: The folium plotting backend does not support this function. Use the ipyleaflet plotting backend instead.
I tried using ipyleaflet
but it does not seem to have streamlit support.
giswqs commented
Linked maps are only supported by the ipyleaflet mapping backend. Unfortunately, streamlit does not support ipyleaflet.
You can try out Solara. https://github.com/opengeos/solara-geospatial