Bug with st_folium

Hi,

In my app, i was using the folim_static function and everything was working well.
I tried to switch to the st_folium function (for the fullscreen option) but whatever i do, the map doesn’t appear properly.
As soon as i try to add something on the map, a tooltip, a popup or the fullscreen option, the map is bugging and appear as follow:

Steps to reproduce

Code snippet:

import folium
import streamlit as st
from streamlit_folium import st_folium
from folium.plugins import Fullscreen

m = folium.Map(location=[39.949610, -75.150282], zoom_start=16)
folium.Marker( [39.949610, -75.150282]).add_to(m)
Fullscreen(position="topleft").add_to(m)
st_folium(m, height=500,width=500, returned_objects=[])

Debug info

  • Streamlit version: 1.26.0
  • Streamlit-folium version: 0.13.0
  • Folium version: 0.14.0
  • Python version: 3.9.13
  • Browser version: Chrome

Can you please help me understand why?

Hi @simon,

Thanks for posting!

I ran the code snippet you provided and it works as expected even with fullscreen. Can you do a screen recording of what you’re experiencing and share it here? Also, add the code snippets you’re using to modify the app so I can replicate the same on my end and help with troubleshooting.

Hey @simon ,
I ran the code snippet and the code is running good. I am not facing any problem in both full screen of minimized screen.


I once suggest you to rerun the streamlit app once!!

Problem solved, thank you for support.

Sometimes st_folium don’t do things right, then switch to folium_static() instead (from streamlit_folium import folium_static)

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.