folium
folium copied to clipboard
Passing folium.Icon to folium.Marker seems to be broken on main
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.
Sorry about that Martin! I made a fix that should hopefully solve this issue.
Shouldn't this be fixed in 0.19.5 ?
For me it still is there in this Version 🙃
> pip show folium
Name: folium
Version: 0.19.5
> pip show geopandas
Name: geopandas
Version: 1.0.1
Hi @LukasWallisch, I tried the example Martin posted in the OP with Folium 0.19.5 and Geopandas 1.0.1 and it works. If it doesn't work for you, could you maybe share a complete reproducible example that leads to your issue?
Yeah,can confirm that the issue GeoPandas was facing has been fixed.