Skip to content

Commit

Permalink
Merge pull request #82 from MAAP-Project/test/add-test-framework
Browse files Browse the repository at this point in the history
get working for STAC layers
  • Loading branch information
sandrahoang686 authored Jul 31, 2023
2 parents 5a5781e + 3dba124 commit c876b9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions stac_ipyleaflet/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ def add_tile_layer(
**kwargs,
)
self.add_layer(tile_layer)
return tile_layer

except Exception as e:
logging.error("Failed to add the specified TileLayer.")
Expand Down
5 changes: 3 additions & 2 deletions stac_ipyleaflet/stac_discovery/stac_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def query_collection_items(selected_collection):
max_items=20,
# intersects=geometries[0],
datetime=_datetime,
titiler_endpoint=self.titiler_endpoint,
titiler_endpoint=TITILER_ENDPOINT,
get_info=True,
)
result_items = list(collection_items.values())
Expand Down Expand Up @@ -825,11 +825,12 @@ def button_clicked(change):
if self.stac_data["layer_added"] == True:
self.layers = self.layers[: len(self.layers) - 1]
self.stac_data["layer_added"] = False
self.add_tile_layer(
applied_tile_layer = self.add_tile_layer(
url=tile_url,
name=items_dropdown.value,
attribution=items_dropdown.value,
)
self.applied_layers.append(applied_tile_layer)
stac_opacity_slider.observe(
handle_stac_layer_opacity, names="value"
)
Expand Down

0 comments on commit c876b9a

Please sign in to comment.