(
self,
bounds: TypeLine,
popup: Union[Popup, str, None] = None,
tooltip: Union[Tooltip, str, None] = None,
**kwargs: TypePathOptions,
)
| 271 | ) |
| 272 | |
| 273 | def __init__( |
| 274 | self, |
| 275 | bounds: TypeLine, |
| 276 | popup: Union[Popup, str, None] = None, |
| 277 | tooltip: Union[Tooltip, str, None] = None, |
| 278 | **kwargs: TypePathOptions, |
| 279 | ): |
| 280 | super().__init__() |
| 281 | self._name = "rectangle" |
| 282 | self.options = path_options(line=True, radius=None, **kwargs) |
| 283 | self.locations = validate_locations(bounds) |
| 284 | assert len(self.locations) == 2, "Need two lat/lon pairs" |
| 285 | if popup is not None: |
| 286 | self.add_child(popup if isinstance(popup, Popup) else Popup(str(popup))) |
| 287 | if tooltip is not None: |
| 288 | self.add_child( |
| 289 | tooltip if isinstance(tooltip, Tooltip) else Tooltip(str(tooltip)) |
| 290 | ) |
| 291 | |
| 292 | def _get_self_bounds(self) -> List[List[Optional[float]]]: |
| 293 | """Compute the bounds of the object itself.""" |
nothing calls this directly
no test coverage detected