From 20bafc32dc791d6aa6296886cf6aebe7d00137f7 Mon Sep 17 00:00:00 2001 From: Frank <33519926+Conengmo@users.noreply.github.com> Date: Fri, 24 Jan 2025 13:49:25 +0100 Subject: [PATCH] fix geojson marker icon --- folium/map.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/folium/map.py b/folium/map.py index b10b27fae..b9557b33f 100644 --- a/folium/map.py +++ b/folium/map.py @@ -403,8 +403,11 @@ def __init__( self.options = remove_empty( draggable=draggable or None, autoPan=draggable or None, **kwargs ) + # this attribute is not used by Marker, but by GeoJson + self.icon: Optional[Icon] = None if icon is not None: self.add_child(icon) + self.icon = icon if popup is not None: self.add_child(popup if isinstance(popup, Popup) else Popup(str(popup))) if tooltip is not None: