Skip to content

Commit b7f54fe

Browse files
committed
Merge branch 'divicon-customicon-remove-seticon' into playwright_tests
2 parents f2eb317 + a53a7b7 commit b7f54fe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

folium/features.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,6 @@ class DivIcon(MacroElement):
17181718
"""
17191719
{% macro script(this, kwargs) %}
17201720
var {{ this.get_name() }} = L.divIcon({{ this.options|tojavascript }});
1721-
{{this._parent.get_name()}}.setIcon({{this.get_name()}});
17221721
{% endmacro %}
17231722
"""
17241723
) # noqa
@@ -1895,7 +1894,6 @@ class CustomIcon(Icon):
18951894
"""
18961895
{% macro script(this, kwargs) %}
18971896
var {{ this.get_name() }} = L.icon({{ this.options|tojavascript }});
1898-
{{ this._parent.get_name() }}.setIcon({{ this.get_name() }});
18991897
{% endmacro %}
19001898
"""
19011899
) # noqa

folium/map.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ class SetIcon(MacroElement):
382382
"""
383383
)
384384

385-
def __init__(self, marker: "Marker", icon: "Icon"):
385+
def __init__(
386+
self, marker: "Marker", icon: Union[Icon, "CustomIcon", "DivIcon"]
387+
):
386388
super().__init__()
387389
self._name = "SetIcon"
388390
self.marker = marker

0 commit comments

Comments
 (0)