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

Passing folium.Icon to folium.Marker seems to be broken on main #2084

Open
martinfleis opened this issue Jan 18, 2025 · 1 comment · May be fixed by #2086
Open

Passing folium.Icon to folium.Marker seems to be broken on main #2084

martinfleis opened this issue Jan 18, 2025 · 1 comment · May be fixed by #2086
Labels
bug An issue describing unexpected or malicious behaviour

Comments

@martinfleis
Copy link
Collaborator

GeoPandas CI is failing with Folium main due to the icon passed to the marker no longer being used.

import folium

fc = {'type': 'FeatureCollection',
 'features': [{'id': '0',
   'type': 'Feature',
   'properties': {'name': 'Vatican City'},
   'geometry': {'type': 'Point', 'coordinates': (12.4533865, 41.9032822)},
   'bbox': (12.4533865, 41.9032822, 12.4533865, 41.9032822)}],
 'bbox': (12.4533865, 41.9032822, 12.4533865, 41.9032822)}

m = folium.Map()
marker = folium.Marker(icon=folium.Icon(icon="star"))
folium.GeoJson(
        fc,
        marker=marker,
).add_to(m)
m

This creates a marker with a star symbol in folium 0.19.4 but uses default on main.

@Conengmo
Copy link
Member

Sorry about that Martin! I made a fix that should hopefully solve this issue.

@Conengmo Conengmo added the bug An issue describing unexpected or malicious behaviour label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected or malicious behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants