File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ class Marker(MacroElement):
340340 folium.Popup or a folium.Popup instance.
341341 tooltip: str or folium.Tooltip, default None
342342 Display a text when hovering over the object.
343- icon: Icon plugin
343+ icon: Icon, CustomIcon or DivIcon, optional
344344 the Icon plugin to use to render the marker.
345345 draggable: bool, default False
346346 Set to True to be able to drag the marker around the map.
@@ -418,12 +418,14 @@ def _get_self_bounds(self) -> TypeBoundsReturn:
418418 return cast (TypeBoundsReturn , [self .location , self .location ])
419419
420420 def render (self ):
421+ from .features import CustomIcon , DivIcon
422+
421423 if self .location is None :
422424 raise ValueError (
423425 f"{ self ._name } location must be assigned when added directly to map."
424426 )
425427 for child in list (self ._children .values ()):
426- if isinstance (child , Icon ):
428+ if isinstance (child , ( Icon , CustomIcon , DivIcon ) ):
427429 self .add_child (self .SetIcon (marker = self , icon = child ))
428430 super ().render ()
429431
You can’t perform that action at this time.
0 commit comments