Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup in Folium.Marker not working #61

Open
KassiusKlay opened this issue May 16, 2022 · 3 comments
Open

Popup in Folium.Marker not working #61

KassiusKlay opened this issue May 16, 2022 · 3 comments

Comments

@KassiusKlay
Copy link

import folium
from streamlit_folium import st_folium


m = folium.Map([45, 0], zoom_start=4)

folium.Marker([45, -30], popup="inline implicit popup").add_to(m)

folium.CircleMarker(
    location=[45, -10],
    radius=25,
    fill=True,
    popup=folium.Popup("inline explicit Popup"),
).add_to(m)

ls = folium.PolyLine(
    locations=[[43, 7], [43, 13], [47, 13], [47, 7], [43, 7]], color="red"
)

ls.add_child(folium.Popup("outline Popup on Polyline"))
ls.add_to(m)

gj = folium.GeoJson(
    data={"type": "Polygon", "coordinates": [[[27, 43], [33, 43], [33, 47], [27, 47]]]}
)

gj.add_child(folium.Popup("outline Popup on GeoJSON"))
gj.add_to(m)

st_folium(m)

output

@blackary
Copy link
Collaborator

Hi @KassiusKlay, thanks for the very clear code and gif showing the error. I just tried this with the latest version of streamlit-folium, and all 4 popups worked for me. What browser and version of streamlit-folium are you using?

@KassiusKlay
Copy link
Author

KassiusKlay commented May 17, 2022

@blackary Safari 15.4 and streamlit-folium 0.6.10

@blackary
Copy link
Collaborator

@KassiusKlay It appears to be a Safari-specific bug. I don't have an obvious fix at this point, but hopefully will eventually. Thankfully, in the meantime, there's an easy workaround of using an explicit popup instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants