(
self,
location: Optional[Sequence[float]] = None,
popup: Union["Popup", str, None] = None,
tooltip: Union["Tooltip", str, None] = None,
icon: Optional[Union[Icon, "CustomIcon", "DivIcon"]] = None,
draggable: bool = False,
**kwargs: TypeJsonValue,
)
| 438 | self.icon = icon |
| 439 | |
| 440 | def __init__( |
| 441 | self, |
| 442 | location: Optional[Sequence[float]] = None, |
| 443 | popup: Union["Popup", str, None] = None, |
| 444 | tooltip: Union["Tooltip", str, None] = None, |
| 445 | icon: Optional[Union[Icon, "CustomIcon", "DivIcon"]] = None, |
| 446 | draggable: bool = False, |
| 447 | **kwargs: TypeJsonValue, |
| 448 | ): |
| 449 | super().__init__() |
| 450 | self._name = "Marker" |
| 451 | self.location = validate_location(location) if location is not None else None |
| 452 | self.options = remove_empty( |
| 453 | draggable=draggable or None, autoPan=draggable or None, **kwargs |
| 454 | ) |
| 455 | # this attribute is not used by Marker, but by GeoJson |
| 456 | self.icon = None |
| 457 | if icon is not None: |
| 458 | self.set_icon(icon) |
| 459 | if popup is not None: |
| 460 | self.add_child(popup if isinstance(popup, Popup) else Popup(str(popup))) |
| 461 | if tooltip is not None: |
| 462 | self.add_child( |
| 463 | tooltip if isinstance(tooltip, Tooltip) else Tooltip(str(tooltip)) |
| 464 | ) |
| 465 | |
| 466 | def _get_self_bounds(self) -> TypeBoundsReturn: |
| 467 | """Computes the bounds of the object itself. |
nothing calls this directly
no test coverage detected