danielle-losos commited on
Commit
9b9b493
·
verified ·
1 Parent(s): f0abc7c

changed map.instance to Map

Browse files
Files changed (1) hide show
  1. pages/05_GOES_NBR.py +5 -5
pages/05_GOES_NBR.py CHANGED
@@ -44,19 +44,19 @@ class Map(geemap.Map):
44
 
45
  @solara.component
46
  def Page():
47
- map_instance = Map(element_id="map")
48
 
49
  def update_map(selected_fire):
50
- map_instance.clear_layers()
51
  print("Adding layer")
52
 
53
  if selected_fire == "North Complex":
54
  print("Adding North Complex layer")
55
- map_instance.addLayer(map_instance.north_complex, map_instance.dNBRvisParams, 'North Complex GOES NBR', True)
56
 
57
  elif selected_fire == "Dixie":
58
  print("Adding Dixie layer")
59
- map_instance.addLayer(map_instance.dixie, map_instance.dNBRvisParams, 'Dixie Complex GOES NBR', True)
60
 
61
  elif selected_fire == "Cameron Peak":
62
  print("Adding Cam Peak layer")
@@ -64,7 +64,7 @@ def Page():
64
 
65
  elif selected_fire == "August Complex":
66
  print("Adding August Complex layer")
67
- map_instance.addLayer(map_instance.aug_complex, map_instance.dNBRvisParams, 'August Complex GOES NBR', True)
68
 
69
 
70
  with solara.Column(style={"min-width": "500px"}):
 
44
 
45
  @solara.component
46
  def Page():
47
+ #map_instance = Map(element_id="map")
48
 
49
  def update_map(selected_fire):
50
+ Map.clear_layers()
51
  print("Adding layer")
52
 
53
  if selected_fire == "North Complex":
54
  print("Adding North Complex layer")
55
+ Map.addLayer(map_instance.north_complex, map_instance.dNBRvisParams, 'North Complex GOES NBR', True)
56
 
57
  elif selected_fire == "Dixie":
58
  print("Adding Dixie layer")
59
+ Map.addLayer(map_instance.dixie, map_instance.dNBRvisParams, 'Dixie Complex GOES NBR', True)
60
 
61
  elif selected_fire == "Cameron Peak":
62
  print("Adding Cam Peak layer")
 
64
 
65
  elif selected_fire == "August Complex":
66
  print("Adding August Complex layer")
67
+ Map.addLayer(map_instance.aug_complex, map_instance.dNBRvisParams, 'August Complex GOES NBR', True)
68
 
69
 
70
  with solara.Column(style={"min-width": "500px"}):