Spaces:
Sleeping
Sleeping
Add int Slider
Browse files- pages/burn_mapping.py +6 -29
pages/burn_mapping.py
CHANGED
@@ -15,6 +15,7 @@ class Map(geemap.Map):
|
|
15 |
self.add_ee_data()
|
16 |
self.add("layer_manager")
|
17 |
self.add_selector()
|
|
|
18 |
|
19 |
def add_ee_data(self):
|
20 |
def calc_nbr(pre_start, pre_stop, post_start, post_stop, bbox):
|
@@ -64,8 +65,10 @@ class Map(geemap.Map):
|
|
64 |
|
65 |
widget = widgets.VBox([selector, output])
|
66 |
self.add_widget(widget, position="topleft")
|
67 |
-
|
68 |
|
|
|
|
|
|
|
69 |
|
70 |
@solara.component
|
71 |
def Page():
|
@@ -78,7 +81,7 @@ def Page():
|
|
78 |
with solara.Column(align="center"):
|
79 |
markdown = """
|
80 |
## Burn Map Generator Case Studies ## """
|
81 |
-
solara.
|
82 |
|
83 |
# Isolation is required to prevent the map from overlapping navigation (when screen width < 960px)
|
84 |
with solara.Column(style={"isolation": "isolate"}):
|
@@ -86,30 +89,4 @@ def Page():
|
|
86 |
center=[39, -120.5],
|
87 |
zoom=8,
|
88 |
height="600px",
|
89 |
-
)
|
90 |
-
|
91 |
-
'''layers=[
|
92 |
-
{
|
93 |
-
"eeObject": Map.calc_nbr('2020-08-15', '2020-08-16', '2020-09-15', '2020-09-16', north_complex_bb),
|
94 |
-
"visParams": dNBRvisParams,
|
95 |
-
"name": "North Complex GOES NBR",
|
96 |
-
"visible": True
|
97 |
-
},
|
98 |
-
{
|
99 |
-
"eeObject": Map.calc_nbr('2021-07-12', '2021-07-13', '2021-09-15', '2021-09-16', dixie_bb),
|
100 |
-
"visParams": dNBRvisParams,
|
101 |
-
"name": "Dixie Complex GOES NBR",
|
102 |
-
"visible": False
|
103 |
-
},
|
104 |
-
{
|
105 |
-
"eeObject": Map.calc_nbr('2020-08-12', '2020-08-13', '2020-09-12', '2020-09-13', cam_peak_bb),
|
106 |
-
"visParams": dNBRvisParams,
|
107 |
-
"name": "Cameron Peak GOES NBR",
|
108 |
-
"visible": True
|
109 |
-
},
|
110 |
-
{
|
111 |
-
"eeObject": Map.calc_nbr('2020-08-15', '2020-08-16', '2020-11-10', '2020-11-11', aug_complex_bb),
|
112 |
-
"visParams": dNBRvisParams,
|
113 |
-
"name": "August Complex GOES NBR",
|
114 |
-
"visible": False
|
115 |
-
}],'''
|
|
|
15 |
self.add_ee_data()
|
16 |
self.add("layer_manager")
|
17 |
self.add_selector()
|
18 |
+
self.add_intSlider()
|
19 |
|
20 |
def add_ee_data(self):
|
21 |
def calc_nbr(pre_start, pre_stop, post_start, post_stop, bbox):
|
|
|
65 |
|
66 |
widget = widgets.VBox([selector, output])
|
67 |
self.add_widget(widget, position="topleft")
|
|
|
68 |
|
69 |
+
def add_intSlider(self):
|
70 |
+
slider = widgets.IntSlider(value=7,min=1,max=30,step=1,description='Elapsed days:',)
|
71 |
+
self.add_widget(slider, position="topleft")
|
72 |
|
73 |
@solara.component
|
74 |
def Page():
|
|
|
81 |
with solara.Column(align="center"):
|
82 |
markdown = """
|
83 |
## Burn Map Generator Case Studies ## """
|
84 |
+
solara.Markdown(markdown)
|
85 |
|
86 |
# Isolation is required to prevent the map from overlapping navigation (when screen width < 960px)
|
87 |
with solara.Column(style={"isolation": "isolate"}):
|
|
|
89 |
center=[39, -120.5],
|
90 |
zoom=8,
|
91 |
height="600px",
|
92 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|