Skip to content

Commit df180b3

Browse files
committed
After review comments
1 parent 89d1a0b commit df180b3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

folium/map.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,15 +424,12 @@ def _get_self_bounds(self) -> TypeBoundsReturn:
424424
return cast(TypeBoundsReturn, [self.location, self.location])
425425

426426
def render(self):
427-
from .features import CustomIcon, DivIcon
428-
429427
if self.location is None:
430428
raise ValueError(
431429
f"{self._name} location must be assigned when added directly to map."
432430
)
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))
431+
if self.icon:
432+
self.add_child(self.SetIcon(marker=self, icon=self.icon))
436433
super().render()
437434

438435

0 commit comments

Comments
 (0)