Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/map_widgets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# map_widgets module

::: geemap.map_widgets
10 changes: 8 additions & 2 deletions geemap/ee_tile_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def _ee_object_to_image(ee_object, vis_params):


def _validate_palette(palette):
if isinstance(palette, tuple):
palette = list(palette)
if isinstance(palette, box.Box):
if "default" not in palette:
raise ValueError("The provided palette Box object is invalid.")
Expand Down Expand Up @@ -92,7 +94,9 @@ def __init__(
shown (bool, optional): A flag indicating whether the layer should be on by default. Defaults to True.
opacity (float, optional): The layer's opacity represented as a number between 0 and 1. Defaults to 1.
"""
self.url_format = _get_tile_url_format(ee_object, _validate_vis_params(vis_params))
self.url_format = _get_tile_url_format(
ee_object, _validate_vis_params(vis_params)
)
super().__init__(
tiles=self.url_format,
attr="Google Earth Engine",
Expand Down Expand Up @@ -127,7 +131,9 @@ def __init__(
shown (bool, optional): A flag indicating whether the layer should be on by default. Defaults to True.
opacity (float, optional): The layer's opacity represented as a number between 0 and 1. Defaults to 1.
"""
self.url_format = _get_tile_url_format(ee_object, _validate_vis_params(vis_params))
self.url_format = _get_tile_url_format(
ee_object, _validate_vis_params(vis_params)
)
super().__init__(
url=self.url_format,
attribution="Google Earth Engine",
Expand Down
Loading