Set the icon of a marker after both are created.
| 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, |
nothing calls this directly
no test coverage detected
searching dependent graphs…