Update app.py
Browse files
app.py
CHANGED
@@ -184,7 +184,7 @@ def add_geometry_to_maps(map_list, opacity=0.0):
|
|
184 |
|
185 |
def get_dem_slope_maps(buffer_ee_geometry):
|
186 |
# Create the map for DEM
|
187 |
-
dem_map =
|
188 |
dem_map.add_tile_layer(
|
189 |
wayback_mapping[latest_date], name=f"Esri Wayback - {latest_date.replace('-', '/')}", attribution="Esri"
|
190 |
)
|
@@ -208,7 +208,7 @@ def get_dem_slope_maps(buffer_ee_geometry):
|
|
208 |
max_value = stats.get("contours_max").getInfo()
|
209 |
min_value = stats.get("contours_min").getInfo()
|
210 |
vis_params = {"min": min_value, "max": max_value, "palette": ["blue", "green", "yellow", "red"]}
|
211 |
-
dem_map.
|
212 |
# Create a colormap
|
213 |
cmap = cm.LinearColormap(colors=vis_params["palette"], vmin=vis_params["min"], vmax=vis_params["max"])
|
214 |
tick_size = int((max_value-min_value)/4)
|
@@ -238,7 +238,7 @@ def get_dem_slope_maps(buffer_ee_geometry):
|
|
238 |
max_value = int(stats.get("slope_max").getInfo())
|
239 |
min_value = int(stats.get("slope_min").getInfo())
|
240 |
vis_params = {"min": min_value, "max": max_value, "palette": ["blue", "green", "yellow", "red"]}
|
241 |
-
slope_map.
|
242 |
# Create a colormap
|
243 |
colormap = cm.LinearColormap(colors=vis_params["palette"], vmin=vis_params["min"], vmax=vis_params["max"])
|
244 |
tick_size=int((max_value-min_value)/4)
|
|
|
184 |
|
185 |
def get_dem_slope_maps(buffer_ee_geometry):
|
186 |
# Create the map for DEM
|
187 |
+
dem_map = gee_folium.Map()
|
188 |
dem_map.add_tile_layer(
|
189 |
wayback_mapping[latest_date], name=f"Esri Wayback - {latest_date.replace('-', '/')}", attribution="Esri"
|
190 |
)
|
|
|
208 |
max_value = stats.get("contours_max").getInfo()
|
209 |
min_value = stats.get("contours_min").getInfo()
|
210 |
vis_params = {"min": min_value, "max": max_value, "palette": ["blue", "green", "yellow", "red"]}
|
211 |
+
dem_map.addLayer(contours, vis_params, "Contours")
|
212 |
# Create a colormap
|
213 |
cmap = cm.LinearColormap(colors=vis_params["palette"], vmin=vis_params["min"], vmax=vis_params["max"])
|
214 |
tick_size = int((max_value-min_value)/4)
|
|
|
238 |
max_value = int(stats.get("slope_max").getInfo())
|
239 |
min_value = int(stats.get("slope_min").getInfo())
|
240 |
vis_params = {"min": min_value, "max": max_value, "palette": ["blue", "green", "yellow", "red"]}
|
241 |
+
slope_map.addLayer(slope_layer, vis_params, "Slope")s
|
242 |
# Create a colormap
|
243 |
colormap = cm.LinearColormap(colors=vis_params["palette"], vmin=vis_params["min"], vmax=vis_params["max"])
|
244 |
tick_size=int((max_value-min_value)/4)
|