Spaces:
Sleeping
Sleeping
Remove solara widgets
Browse files- pages/05_GOES_NBR.py +5 -44
pages/05_GOES_NBR.py
CHANGED
@@ -36,7 +36,7 @@ class Map(geemap.Map):
|
|
36 |
cam_peak = calc_nbr('2020-08-12', '2020-08-13', '2020-09-12', '2020-09-13', cam_peak_bb)
|
37 |
aug_complex = calc_nbr('2020-08-15', '2020-08-16', '2020-11-10', '2020-11-11', aug_complex_bb)
|
38 |
|
39 |
-
self.addLayer(north_complex, dNBRvisParams, 'North Complex GOES NBR',
|
40 |
self.addLayer(dixie, dNBRvisParams, 'Dixie Complex GOES NBR', False)
|
41 |
self.addLayer(cam_peak, dNBRvisParams, 'Cameron Peak GOES NBR', False)
|
42 |
self.addLayer(aug_complex, dNBRvisParams, 'August Complex GOES NBR', False)
|
@@ -61,58 +61,19 @@ class Map(geemap.Map):
|
|
61 |
print(f"Selected wildfire case study: {selected_fire}")
|
62 |
|
63 |
selector.observe(on_selector_change, names='value')
|
64 |
-
|
65 |
-
#def on_selection(_):
|
66 |
-
# with output:
|
67 |
-
# print(output)
|
68 |
-
|
69 |
-
#selector.on_click(on_selection)
|
70 |
|
71 |
widget = widgets.VBox([selector, output])
|
72 |
self.add_widget(widget, position="topleft")
|
73 |
|
74 |
-
'''
|
75 |
-
selector = widgets.Dropdown(options=fireList, value="North Complex", description='Wildfire Case Study:')
|
76 |
-
mapFire_button = widgets.Button(description="Map the burn scar")
|
77 |
-
mapFire_button.on_click(on_button_clicked)
|
78 |
-
|
79 |
-
widgetsBox = widgets.VBox([selector, mapFire_button])
|
80 |
-
self.add_widget(widgetsBox, position="topleft")
|
81 |
-
self.add("layer_manager")
|
82 |
-
self.add("inspector")
|
83 |
-
|
84 |
-
|
85 |
-
def on_button_clicked():
|
86 |
-
self.clear_layers()
|
87 |
-
if selector.value == "North Complex":
|
88 |
-
self.find_layer('North Complex GOES NBR').visible = True
|
89 |
-
elif selector.value == "Dixie":
|
90 |
-
self.find_layer('Dixie Complex GOES NBR').visible = True
|
91 |
-
elif selector.value == "Cameron Peak":
|
92 |
-
self.find_layer('Cameron Peak GOES NBR').visible = True
|
93 |
-
elif selector.value == "August Complex":
|
94 |
-
self.find_layer('August Complex GOES NBR').visible = True
|
95 |
-
'''
|
96 |
|
97 |
|
98 |
@solara.component
|
99 |
def Page():
|
100 |
|
101 |
-
with solara.Column(style={"align":"start", "min-width": "200px", "height": "200px"}):
|
102 |
-
solara.Select(label="Wildfire Case Study", value=selected_fire, values=fireList)
|
103 |
-
solara.Markdown(f"**Selected**: {selected_fire.value}")
|
104 |
-
solara.Button(label="Map the burn scar",) #on_click = on_button_clicked)
|
105 |
-
|
106 |
-
'''def on_button_clicked():
|
107 |
-
Map.clear_layers()
|
108 |
-
if selected_fire == "North Complex":
|
109 |
-
Map.find_layer("North Complex GOES NBR").visible = True
|
110 |
-
elif selected_fire == "Dixie":
|
111 |
-
Map.find_layer("Dixie Complex GOES NBR").visible = True
|
112 |
-
elif selected_fire == "Cameron Peak":
|
113 |
-
Map.find_layer("Cameron Peak GOES NBR").visible = True
|
114 |
-
elif selected_fire == "August Complex":
|
115 |
-
Map.find_layer("August Complex GOES NBR").visible = True'''
|
116 |
|
117 |
|
118 |
# Isolation is required to prevent the map from overlapping navigation (when screen width < 960px)
|
|
|
36 |
cam_peak = calc_nbr('2020-08-12', '2020-08-13', '2020-09-12', '2020-09-13', cam_peak_bb)
|
37 |
aug_complex = calc_nbr('2020-08-15', '2020-08-16', '2020-11-10', '2020-11-11', aug_complex_bb)
|
38 |
|
39 |
+
self.addLayer(north_complex, dNBRvisParams, 'North Complex GOES NBR', False)
|
40 |
self.addLayer(dixie, dNBRvisParams, 'Dixie Complex GOES NBR', False)
|
41 |
self.addLayer(cam_peak, dNBRvisParams, 'Cameron Peak GOES NBR', False)
|
42 |
self.addLayer(aug_complex, dNBRvisParams, 'August Complex GOES NBR', False)
|
|
|
61 |
print(f"Selected wildfire case study: {selected_fire}")
|
62 |
|
63 |
selector.observe(on_selector_change, names='value')
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
widget = widgets.VBox([selector, output])
|
66 |
self.add_widget(widget, position="topleft")
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
|
70 |
@solara.component
|
71 |
def Page():
|
72 |
|
73 |
+
#with solara.Column(style={"align":"start", "min-width": "200px", "height": "200px"}):
|
74 |
+
#solara.Select(label="Wildfire Case Study", value=selected_fire, values=fireList)
|
75 |
+
#solara.Markdown(f"**Selected**: {selected_fire.value}")
|
76 |
+
#solara.Button(label="Map the burn scar",) #on_click = on_button_clicked)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
|
79 |
# Isolation is required to prevent the map from overlapping navigation (when screen width < 960px)
|