We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89d1a0b commit df180b3Copy full SHA for df180b3
folium/map.py
@@ -424,15 +424,12 @@ def _get_self_bounds(self) -> TypeBoundsReturn:
424
return cast(TypeBoundsReturn, [self.location, self.location])
425
426
def render(self):
427
- from .features import CustomIcon, DivIcon
428
-
429
if self.location is None:
430
raise ValueError(
431
f"{self._name} location must be assigned when added directly to map."
432
)
433
- for child in list(self._children.values()):
434
- if isinstance(child, (Icon, CustomIcon, DivIcon)):
435
- self.add_child(self.SetIcon(marker=self, icon=child))
+ if self.icon:
+ self.add_child(self.SetIcon(marker=self, icon=self.icon))
436
super().render()
437
438
0 commit comments