diff --git a/setup.py b/setup.py index b88b654..6640792 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="streamlit_folium", - version="0.6.1", + version="0.6.2", author="Randy Zwitch", author_email="randy@streamlit.io", description="Render Folium objects in Streamlit", diff --git a/streamlit_folium/__init__.py b/streamlit_folium/__init__.py index f721e07..096785e 100644 --- a/streamlit_folium/__init__.py +++ b/streamlit_folium/__init__.py @@ -101,6 +101,8 @@ def st_folium( # handle the case where you pass in a figure rather than a map # this assumes that a map is the first child + fig.render() + if not (isinstance(fig, folium.Map) or isinstance(fig, folium.plugins.DualMap)): fig = list(fig._children.values())[0] diff --git a/streamlit_folium/frontend/src/index.tsx b/streamlit_folium/frontend/src/index.tsx index 3e63af3..39f5a21 100644 --- a/streamlit_folium/frontend/src/index.tsx +++ b/streamlit_folium/frontend/src/index.tsx @@ -119,9 +119,7 @@ function onRender(event: Event): void { let layer = map._layers[key]; layer.on("click", onLayerClick) } - debugger; map.on('draw:created', onDraw); - //map.on('draw:edited', onDraw); Streamlit.setFrameHeight() updateComponentValue();