UjjwalKGupta commited on
Commit
e38ccc6
·
verified ·
1 Parent(s): f6c598f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -11,7 +11,8 @@ from io import BytesIO
11
  import fiona
12
  from shapely import wkb
13
  from shapely.ops import transform
14
- import leafmap
 
15
 
16
 
17
  # Enable fiona driver
@@ -234,11 +235,11 @@ if uploaded_file is not None:
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
  m.addLayer(geom_ee_object, {}, 'KML Original')
240
  m.addLayer(buffered_ee_object, {}, 'KML Buffered')
241
- st.map(m)
242
 
243
 
244
  else:
 
11
  import fiona
12
  from shapely import wkb
13
  from shapely.ops import transform
14
+ import geemap.foliumap as geemapfolium
15
+ from streamlit_folium import st_folium
16
 
17
 
18
  # Enable fiona driver
 
235
  # Visualize map on ESRI basemap
236
  st.write("Map Visualization")
237
 
238
+ m = geemapfolium.Map(center=polygon_info['centroid'], zoom=14)
239
  # Center the map and display the image.
240
  m.addLayer(geom_ee_object, {}, 'KML Original')
241
  m.addLayer(buffered_ee_object, {}, 'KML Buffered')
242
+ st_folium(m)
243
 
244
 
245
  else: