Zeel commited on
Commit
a633cb2
·
1 Parent(s): 28194a7
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -8,7 +8,7 @@ import leafmap.foliumap as leafmap
8
  # wide streamlit display
9
  st.set_page_config(layout="wide")
10
 
11
- file_url = st.query_params.get("file_url", [None])
12
  print(f"{file_url=}")
13
 
14
  if file_url:
@@ -26,13 +26,21 @@ if file_url:
26
  geometry_gdf = input_gdf[input_gdf.index == input_geometry_idx]
27
 
28
  m = leafmap.Map()
29
- map_type = st.radio("Select the map type", ["Esri Satellite Map", "Google Hybrid Map", "Google Satellite Map"])
30
- if map_type == "Google Hybrid Map":
 
 
 
 
 
 
 
31
  m.add_basemap("HYBRID")
32
  elif map_type == "Google Satellite Map":
 
33
  m.add_basemap("SATELLITE")
34
  elif map_type == "Esri Satellite Map":
35
- st.write("<h3><div style='text-align: center;'>Esri - 2024/10/10</div></h3>", unsafe_allow_html=True)
36
  m.add_wms_layer(
37
  "https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/GoogleMapsCompatible/MapServer/tile/56450/{z}/{y}/{x}",
38
  layers="0",
 
8
  # wide streamlit display
9
  st.set_page_config(layout="wide")
10
 
11
+ file_url = st.query_params.get("file_url", None)
12
  print(f"{file_url=}")
13
 
14
  if file_url:
 
26
  geometry_gdf = input_gdf[input_gdf.index == input_geometry_idx]
27
 
28
  m = leafmap.Map()
29
+ map_type = st.radio(
30
+ "Select the map type",
31
+ ["Esri Satellite Map", "Google Hybrid Map (displays place names)", "Google Satellite Map"],
32
+ )
33
+ if map_type == "Google Hybrid Map (displays place names)":
34
+ st.write(
35
+ "<h4><div style='text-align: center;'>Google Hybrid (displays place names)</div></h4>",
36
+ unsafe_allow_html=True,
37
+ )
38
  m.add_basemap("HYBRID")
39
  elif map_type == "Google Satellite Map":
40
+ st.write("<h4><div style='text-align: center;'>Google Satellite</div></h4>", unsafe_allow_html=True)
41
  m.add_basemap("SATELLITE")
42
  elif map_type == "Esri Satellite Map":
43
+ st.write("<h4><div style='text-align: center;'>Esri - 2024/10/10</div></h4>", unsafe_allow_html=True)
44
  m.add_wms_layer(
45
  "https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/GoogleMapsCompatible/MapServer/tile/56450/{z}/{y}/{x}",
46
  layers="0",