Hi @AndreasNehls, welcome to the Streamlit community!
As streamlit-folium is an external Component (that just happens to be written by me ), itās not part of the methods defined in Streamlit for the column/layout API. Instead, try the following as your last line:
I did it using with column:
folium_static(m)
and it works fine but it is currently not possible to set the option āuse_container_width = Trueā. Can you make it happen?
I can set the width and height in folium but the map doesnāt resize if I zoom in or zoom out my dashboard
Not sure thatās possible. The way folium_static sets the size is by reading from the Folium object on the Python side, or whatever the developer specifies from Python. Itās not clear to me how Iād be able to get the size from the JavaScript side (i.e. the browser), but know about it from the Python side.
If someone could figure it out though, I am happy to accept a PR, as it does sound like desirable functionality.
How did you do for other maps and charts such as: st.pydeck_chart, st.map or st.altair_chart etc ? they are all equipped with use_container_width option
Because all of those functions are part of the Streamlit python package. Folium and streamlit-folium donāt share any of the same Python classes, folium_static literally just reads the HTML representation from the Folium object and displays it.
Thanks! Do you know if itās possible to set initial page-zoom level smaller than 100% (currently if I deploy the app) - donāt see it in the st.set_page_config
what I meant was because I canāt control the width of folium_static when I first deploy my app and open - it will be display with 100% and the two columns are overlaid like this:
Iām encountering the same issue ā is there a way to prevent the Folium map from overlaying on the Streamlit app? The map size doesnāt change when zooming in on the web, which is causing the app to become unresponsive. Iām keen to know if anyone has found a solution or an alternative.
Hi, Is there any update on this? I am encountering the same issue aswell.
I have tried several options but it did not worked out. What I want is that the folium map adjust dynamically on page/container width.