Skip to content

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

Closed
@martinfleis

Description

@martinfleis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue describing unexpected or malicious behaviour

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions