MCPcopy Create free account
hub / github.com/python-visualization/folium / SetIcon

Class SetIcon

folium/map.py:421–438  ·  view source on GitHub ↗

Set the icon of a marker after both are created.

Source from the content-addressed store, hash-verified

419 )
420
421 class SetIcon(MacroElement):
422 """Set the icon of a marker after both are created."""
423
424 _template = Template(
425 """
426 {% macro script(this, kwargs) %}
427 {{ this.marker.get_name() }}.setIcon({{ this.icon.get_name() }});
428 {% endmacro %}
429 """
430 )
431
432 def __init__(
433 self, marker: "Marker", icon: Union[Icon, "CustomIcon", "DivIcon"]
434 ):
435 super().__init__()
436 self._name = "SetIcon"
437 self.marker = marker
438 self.icon = icon
439
440 def __init__(
441 self,

Callers

nothing calls this directly

Calls 1

TemplateClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…