Removes a widget to the map.
(self, widget: Any)
| 5557 | return None |
| 5558 | |
| 5559 | def remove(self, widget: Any) -> None: |
| 5560 | """Removes a widget to the map.""" |
| 5561 | |
| 5562 | basic_controls: Dict[str, ipyleaflet.Control] = { |
| 5563 | "layer_editor": map_widgets.LayerEditor, |
| 5564 | } |
| 5565 | if widget_type := basic_controls.get(widget, None): |
| 5566 | if control := self._find_widget_of_type(widget_type, return_control=True): |
| 5567 | self.remove(control) |
| 5568 | control.close() |
| 5569 | return |
| 5570 | |
| 5571 | super().remove(widget) |
| 5572 | if isinstance(widget, widgets.Widget): |
| 5573 | widget.close() |
| 5574 | |
| 5575 | def edit_points( |
| 5576 | self, |
no test coverage detected