Skip to content

Commit

Permalink
Merge branch 'master' into toolbar-toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
sufyanAbbasi committed Oct 6, 2023
2 parents 6d0d9e2 + 3e3333c commit ef22459
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
9 changes: 9 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v0.28.2 - Oct 4, 2023

**What's Changed**

- Update changelog for v0.28.1 by @giswqs in [#1758](https://github.com/gee-community/geemap/pull/1758)
- Hotfix for broken basemap selector in core by @naschmitz in [#1759](https://github.com/gee-community/geemap/pull/1759)

**Full Changelog**: [v0.28.1...v0.28.2](https://github.com/gee-community/geemap/compare/v0.28.1...v0.28.2)

## v0.28.1 - Oct 4, 2023

**What's Changed**
Expand Down
2 changes: 1 addition & 1 deletion geemap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Qiusheng Wu"""
__email__ = "giswqs@gmail.com"
__version__ = "0.28.1"
__version__ = "0.28.2"

import os

Expand Down
3 changes: 0 additions & 3 deletions geemap/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,6 @@ def __init__(self, **kwargs):
kwargs = self._apply_kwarg_defaults(kwargs)
super().__init__(**kwargs)

if len(self.layers) > 0 and self.layers[0].name == "OpenStreetMap.Mapnik":
self.layers[0].name = "OpenStreetMap"

for position, widgets in self._control_config().items():
for widget in widgets:
self.add(widget, position=position)
Expand Down
6 changes: 5 additions & 1 deletion geemap/map_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def _set_css_in_cell_output():

class Theme:
"""Applies dynamic theme in Colab, otherwise light."""

current_theme = "colab" if common.in_colab_shell() else "light"

@staticmethod
Expand Down Expand Up @@ -1047,7 +1048,10 @@ def __init__(self, host_map, layer_dict):
self._max_value = self._vis_params["max"]
self._right_value = 2 * self._max_value
if "gamma" in self._vis_params.keys():
self._layer_gamma = self._vis_params["gamma"]
if isinstance(self._vis_params["gamma"], list):
self._layer_gamma = self._vis_params["gamma"][0]
else:
self._layer_gamma = self._vis_params["gamma"]
if "bands" in self._vis_params.keys():
self._sel_bands = self._vis_params["bands"]
if "palette" in self._vis_params.keys():
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.28.1
current_version = 0.28.2
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/gee-community/geemap",
version="0.28.1",
version="0.28.2",
zip_safe=False,
)
8 changes: 8 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ def test_add_draw_control(self):
self.assertEqual(len(self.core_map.controls), 1)
self.assertIsInstance(self.core_map.get_draw_control(), core.MapDrawControl)

def test_add_basemap_selector(self):
"""Tests adding the basemap selector widget."""
self._clear_default_widgets()

self.core_map.add("basemap_selector")

self.assertEqual(len(self.core_map.controls), 1)


@patch.object(ee, "FeatureCollection", fake_ee.FeatureCollection)
@patch.object(ee, "Feature", fake_ee.Feature)
Expand Down

0 comments on commit ef22459

Please sign in to comment.