giswqs / geemap-streamlit

geemap with streamlit
https://gishub.org/streamlit-geemap
MIT License
14 stars 9 forks source link

Facing issue in integrating geemap with streamlit pls help #4

Closed Meherbanali14 closed 10 months ago

Meherbanali14 commented 10 months ago

Cell In[14], line 5 1 m = geemap.Map() 4 # call to render Folium map in Streamlit ----> 5 folium_static(m)

File ~\anaconda3\envs\gee\lib\site-packages\streamlit_folium__init__.py:103, in folium_static(fig, width, height) 99 elif isinstance(fig, folium.plugins.DualMap) or isinstance( 100 fig, branca.element.Figure 101 ): 102 return components.html(fig._reprhtml(), height=height + 10, width=width) --> 103 return st_folium(fig, width=width, height=height, returned_objects=[])

File ~\anaconda3\envs\gee\lib\site-packages\streamlit_folium__init__.py:241, in st_folium(fig, key, height, width, returned_objects, zoom, center, feature_group_to_add, return_on_hover, use_container_width) 238 # handle the case where you pass in a figure rather than a map 239 # this assumes that a map is the first child 240 if not (isinstance(fig, folium.Map) or isinstance(fig, folium.plugins.DualMap)): --> 241 folium_map = list(fig._children.values())[0] 243 folium_map.render() 245 leaflet = _get_map_string(folium_map) # type: ignore

AttributeError: 'Map' object has no attribute '_children'