Vertdure commited on
Commit
89cdeba
1 Parent(s): fd2cd43

Update pages/12_🌲_VertXtractor.py

Browse files
Files changed (1) hide show
  1. pages/12_🌲_VertXtractor.py +7 -4
pages/12_🌲_VertXtractor.py CHANGED
@@ -338,9 +338,7 @@ st.subheader("Select Bounding Box")
338
  m = folium.Map(location=[46.8182, 8.2275], zoom_start=8)
339
 
340
  # Add rectangle draw control
341
- draw = folium.plugins.Draw(
342
- export=False,
343
- position='topleft',
344
  draw_options={
345
  'rectangle': True,
346
  'polygon': False,
@@ -348,13 +346,18 @@ draw = folium.plugins.Draw(
348
  'circle': False,
349
  'marker': False,
350
  'circlemarker': False
351
- }
 
352
  )
353
  draw.add_to(m)
354
 
355
  # Display the map
356
  folium_static(m)
357
 
 
 
 
 
358
  # Get bbox from drawn rectangle
359
  if 'bbox' not in st.session_state:
360
  st.session_state.bbox = None
 
338
  m = folium.Map(location=[46.8182, 8.2275], zoom_start=8)
339
 
340
  # Add rectangle draw control
341
+ draw = Draw(
 
 
342
  draw_options={
343
  'rectangle': True,
344
  'polygon': False,
 
346
  'circle': False,
347
  'marker': False,
348
  'circlemarker': False
349
+ },
350
+ edit_options={'edit': False}
351
  )
352
  draw.add_to(m)
353
 
354
  # Display the map
355
  folium_static(m)
356
 
357
+ # Button to activate drawing mode
358
+ if st.button("Draw Rectangle"):
359
+ st.info("Use the rectangle tool on the map to select your area of interest.")
360
+
361
  # Get bbox from drawn rectangle
362
  if 'bbox' not in st.session_state:
363
  st.session_state.bbox = None