I’m currently facing an issue with my app that uses st_folium. During the initial rendering of the page, there is a large white space appearing below the map, which disappears when I refresh the page.
To help diagnose the problem, here’s the requested information:
Running Environment: Local but same when deployed. Versions:
Streamlit: 1.39.0
Streamlit-folium: 0.22.1
Python: 3.11.3
Any insights or suggestions on how to resolve this issue would be greatly appreciated!
Thank you!
Below is the simple test code.
import streamlit as st
import folium
from streamlit_folium import st_folium
st.title("Test Streamlit-folium")
# Init map
m = folium.Map(location=[50.8182, 4.2275], zoom_start=6)
st_data = st_folium(m)
import streamlit as st
import folium
from streamlit_folium import folium_static
st.title("Test Streamlit-folium")
m = folium.Map(location=[50.8182, 4.2275], zoom_start=6)
st_data = folium_static(m, width=300, height=300)
st.markdown("checking if there is whitespace")
Thank you for your help! It would have worked, but I forgot to mention that I’m using markers and need the feedback from the map : “st_data”. Therefore, it’s not feasible for me to use folium_static in this case.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.