From 872540c29cb7594928dfdd1f67f2f59dd6f14050 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Thu, 28 Nov 2024 23:29:25 -0500 Subject: [PATCH] Improve NASA Search Data --- leafmap/toolbar.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/leafmap/toolbar.py b/leafmap/toolbar.py index 3e1371b7a0..bbc2f906f5 100644 --- a/leafmap/toolbar.py +++ b/leafmap/toolbar.py @@ -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]) @@ -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)