Skip to content

Commit

Permalink
Improve NASA Search Data
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Nov 29, 2024
1 parent e5740ec commit 872540c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions leafmap/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -6531,11 +6531,30 @@ def button_clicked(change):
and m._NASA_DATA_CTRL in m.controls
):
m.remove(m._NASA_DATA_CTRL)

style = {
# "stroke": True,
"color": "#3388ff",
"weight": 2,
"opacity": 1,
"fill": True,
"fillColor": "#3388ff",
"fillOpacity": 0.1,
}

hover_style = {
"weight": style["weight"] + 2,
"fillOpacity": 0,
"color": "yellow",
}

m.add_gdf(
gdf,
layer_name="Footprints",
info_mode="on_click",
zoom_to_layer=False,
style=style,
hover_style=hover_style,
)
setattr(m, "_NASA_DATA_CTRL", m.controls[-1])

Expand All @@ -6544,6 +6563,7 @@ def button_clicked(change):

setattr(m, "_NASA_DATA_GDF", gdf)
setattr(m, "_NASA_DATA_RESULTS", results)
output.clear_output()

except Exception as e:
print(e)
Expand Down

0 comments on commit 872540c

Please sign in to comment.