MCPcopy Index your code
hub / github.com/opengeos/leafmap / remove

Method remove

leafmap/leafmap.py:5559–5573  ·  view source on GitHub ↗

Removes a widget to the map.

(self, widget: Any)

Source from the content-addressed store, hash-verified

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,

Callers 15

add_rasterMethod · 0.95
_add_layer_editorMethod · 0.95
close_widget_controlMethod · 0.95
to_htmlMethod · 0.80
logoutFunction · 0.80
remove_sourceMethod · 0.80
edit_gps_traceFunction · 0.80
on_export_clickFunction · 0.80
add_geojsonMethod · 0.80
to_htmlMethod · 0.80
download_assetFunction · 0.80
button_clickedFunction · 0.80

Calls 1

_find_widget_of_typeMethod · 0.95

Tested by

no test coverage detected