Skip to content

Commit

Permalink
Fix removing drawn feature bug (#1805)
Browse files Browse the repository at this point in the history
* Fix removing drawn feature bug

* Fix basemap and docs build error
  • Loading branch information
giswqs authored Oct 31, 2023
1 parent c348245 commit ddc512c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.11"
- name: Install GDAL
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.11"
- name: Install GDAL
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 2 additions & 0 deletions geemap/geemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2479,6 +2479,8 @@ def remove_drawn_features(self):
"""Removes user-drawn geometries from the map"""
if self._draw_control is not None:
self._draw_control.reset()
if "Drawn Features" in self.ee_layers:
self.ee_layers.pop("Drawn Features")

def remove_last_drawn(self):
"""Removes last user-drawn geometry from the map"""
Expand Down
2 changes: 1 addition & 1 deletion geemap/plotlymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ def add_heatmap_demo(self, **kwargs):
**kwargs,
)

self.add_basemap("Stamen.Terrain")
self.add_basemap("Esri.WorldTopoMap")
self.add_trace(heatmap)

def add_gdf(
Expand Down
2 changes: 1 addition & 1 deletion geemap/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4928,7 +4928,7 @@ def plotly_basemap_gui(canvas, map_min_width="78%", map_max_width="98%"):

map_widget.layout.width = map_min_width

value = "Stamen.Terrain"
value = "Esri.WorldTopoMap"
m.add_basemap(value)

dropdown = widgets.Dropdown(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_basemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_xyz_to_leaflet_sources(self):
expected_keys = {
"custom_xyz": "OpenStreetMap",
"custom_wms": "USGS NAIP Imagery",
"xyzservices_xyz": "Stamen.Terrain",
"xyzservices_xyz": "Esri.WorldTopoMap",
}
for _, expected_name in expected_keys.items():
self.assertIn(expected_name, self.tiles)
Expand Down

0 comments on commit ddc512c

Please sign in to comment.