Spaces:
Sleeping
Sleeping
Add opacity
Browse files
app.py
CHANGED
@@ -352,7 +352,7 @@ if uploaded_file is not None and submit_button:
|
|
352 |
# Add the image to the map as a layer
|
353 |
layer_name = f"Image {i+1} - {date}"
|
354 |
vis_params = {'min': -1, 'max': 1, 'palette': ['blue', 'white', 'green']} # Example visualization for Sentinel-2
|
355 |
-
m.add_layer(ndvi_image, vis_params, layer_name, z_index=i+10)
|
356 |
|
357 |
m.add_layer(geom_ee_object, {}, 'KML Original', z_index=1)
|
358 |
m.add_layer(buffered_ee_object, {}, 'KML Buffered', z_index=2)
|
@@ -366,7 +366,6 @@ if uploaded_file is not None and submit_button:
|
|
366 |
|
367 |
# Display the map and allow interactions without triggering reruns
|
368 |
with st.container():
|
369 |
-
# st_folium should not cause reruns, just return user interactions
|
370 |
st_folium(st.session_state["map"], width=725, returned_objects=[])
|
371 |
|
372 |
else:
|
|
|
352 |
# Add the image to the map as a layer
|
353 |
layer_name = f"Image {i+1} - {date}"
|
354 |
vis_params = {'min': -1, 'max': 1, 'palette': ['blue', 'white', 'green']} # Example visualization for Sentinel-2
|
355 |
+
m.add_layer(ndvi_image, vis_params, layer_name, z_index=i+10, opacity=0.5)
|
356 |
|
357 |
m.add_layer(geom_ee_object, {}, 'KML Original', z_index=1)
|
358 |
m.add_layer(buffered_ee_object, {}, 'KML Buffered', z_index=2)
|
|
|
366 |
|
367 |
# Display the map and allow interactions without triggering reruns
|
368 |
with st.container():
|
|
|
369 |
st_folium(st.session_state["map"], width=725, returned_objects=[])
|
370 |
|
371 |
else:
|