Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,8 @@ import base64
|
|
| 14 |
import tempfile
|
| 15 |
from datetime import datetime
|
| 16 |
from typing import Dict, Any, Tuple, List, Optional
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# Visualization & PDF
|
| 19 |
import matplotlib.pyplot as plt
|
|
@@ -993,6 +995,7 @@ import matplotlib.pyplot as plt
|
|
| 993 |
from datetime import datetime
|
| 994 |
from io import BytesIO
|
| 995 |
import base64
|
|
|
|
| 996 |
|
| 997 |
def locator_page():
|
| 998 |
"""
|
|
@@ -1302,8 +1305,7 @@ def locator_page():
|
|
| 1302 |
|
| 1303 |
st.markdown("👉 Draw a polygon/rectangle on the map (use draw tool). After drawing, click **Compute Summaries**.")
|
| 1304 |
|
| 1305 |
-
map_data = m
|
| 1306 |
-
|
| 1307 |
if map_data and map_data.get("last_object"):
|
| 1308 |
st.session_state["roi_geojson"] = json.dumps(map_data["last_object"])
|
| 1309 |
|
|
|
|
| 14 |
import tempfile
|
| 15 |
from datetime import datetime
|
| 16 |
from typing import Dict, Any, Tuple, List, Optional
|
| 17 |
+
import streamlit as st
|
| 18 |
+
from streamlit_folium import st_folium
|
| 19 |
|
| 20 |
# Visualization & PDF
|
| 21 |
import matplotlib.pyplot as plt
|
|
|
|
| 995 |
from datetime import datetime
|
| 996 |
from io import BytesIO
|
| 997 |
import base64
|
| 998 |
+
from streamlit_folium import st_folium
|
| 999 |
|
| 1000 |
def locator_page():
|
| 1001 |
"""
|
|
|
|
| 1305 |
|
| 1306 |
st.markdown("👉 Draw a polygon/rectangle on the map (use draw tool). After drawing, click **Compute Summaries**.")
|
| 1307 |
|
| 1308 |
+
map_data = st_folium(m, height=700, use_container_width=True)
|
|
|
|
| 1309 |
if map_data and map_data.get("last_object"):
|
| 1310 |
st.session_state["roi_geojson"] = json.dumps(map_data["last_object"])
|
| 1311 |
|