Spaces:
Sleeping
Sleeping
UjjwalKGupta
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -234,16 +234,12 @@ if uploaded_file is not None:
|
|
234 |
# Visualize map on ESRI basemap
|
235 |
st.write("Map Visualization")
|
236 |
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
239 |
|
240 |
-
# Add ESRI latest imagery basemap and polygon
|
241 |
-
m.add_basemap("ESRI/WorldImagery")
|
242 |
-
m.add_geojson(geom_ee_object, "Polygon", color="red", fill_opacity=0.5)
|
243 |
-
m.add_geojson(buffered_ee_object, "Polygon", color="black", fill_opacity=0.5)
|
244 |
-
|
245 |
-
# Display the map
|
246 |
-
m.to_streamlit()
|
247 |
|
248 |
else:
|
249 |
st.write('ValueError: "Input must have single polygon geometry"')
|
|
|
234 |
# Visualize map on ESRI basemap
|
235 |
st.write("Map Visualization")
|
236 |
|
237 |
+
m = geemap.Map(center=polygon_info['centroid'], zoom=14)
|
238 |
+
# Center the map and display the image.
|
239 |
+
Map.addLayer(geom_ee_object, {}, 'KML Original')
|
240 |
+
Map.addLayer(buffered_ee_object, {}, 'KML Buffered')
|
241 |
+
st.map(m)
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
|
244 |
else:
|
245 |
st.write('ValueError: "Input must have single polygon geometry"')
|