danielle-losos commited on
Commit
1f91692
·
verified ·
1 Parent(s): ccf5a67

Update pages/05_GOES_NBR.py

Browse files

Changed on_click function to observe

Files changed (1) hide show
  1. pages/05_GOES_NBR.py +12 -3
pages/05_GOES_NBR.py CHANGED
@@ -45,11 +45,20 @@ class Map(geemap.Map):
45
  selector = widgets.Dropdown(options=fireList, value="North Complex", description='Wildfire Case Study:')
46
  output = widgets.Output()
47
 
48
- def on_selection(_):
 
 
49
  with output:
50
- print(output)
 
 
 
 
 
 
 
51
 
52
- selector.on_click(on_selection)
53
 
54
  widget = widgets.VBox([selector, output])
55
  self.add_widget(widget)
 
45
  selector = widgets.Dropdown(options=fireList, value="North Complex", description='Wildfire Case Study:')
46
  output = widgets.Output()
47
 
48
+ def on_selector_change(change):
49
+ selected_fire = change['new']
50
+ # Your logic to handle the selected fire
51
  with output:
52
+ output.clear_output()
53
+ print(f"Selected wildfire case study: {selected_fire}")
54
+
55
+ selector.observe(on_selector_change, names='value')
56
+
57
+ #def on_selection(_):
58
+ # with output:
59
+ # print(output)
60
 
61
+ #selector.on_click(on_selection)
62
 
63
  widget = widgets.VBox([selector, output])
64
  self.add_widget(widget)