Skip to content

Commit

Permalink
Fix removing layer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Nov 2, 2023
1 parent 1f7ce76 commit 634e3f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions geemap/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,9 @@ def remove(self, widget: Any) -> None:
control.close()
return

if hasattr(widget, "name") and widget.name in self.ee_layers:
self.ee_layers.pop(widget.name)

if ee_layer := self.ee_layers.pop(widget, None):
tile_layer = ee_layer.get("ee_layer", None)
if tile_layer is not None:
Expand Down

0 comments on commit 634e3f4

Please sign in to comment.