giswqs commited on
Commit
b0cebb7
·
1 Parent(s): af57935

Made map width responsive

Browse files
Files changed (4) hide show
  1. apps/basemaps.py +3 -6
  2. apps/census.py +1 -1
  3. apps/gee.py +2 -2
  4. apps/wms.py +5 -2
apps/basemaps.py CHANGED
@@ -10,13 +10,10 @@ def app():
10
  """
11
  )
12
 
13
- row0_col1, row0_col2 = st.columns([3, 0.5])
 
14
 
15
- with row0_col1:
16
- with st.expander("See demo"):
17
- st.image("https://i.imgur.com/0SkUhZh.gif")
18
-
19
- row1_col1, row1_col2, _ = st.columns([2, 1, 0.5])
20
  width = 800
21
  height = 600
22
  tiles = None
 
10
  """
11
  )
12
 
13
+ with st.expander("See demo"):
14
+ st.image("https://i.imgur.com/0SkUhZh.gif")
15
 
16
+ row1_col1, row1_col2 = st.columns([3, 1])
 
 
 
 
17
  width = 800
18
  height = 600
19
  tiles = None
apps/census.py CHANGED
@@ -15,7 +15,7 @@ def app():
15
  else:
16
  st.session_state["first_index"] = 0
17
 
18
- row1_col1, row1_col2, _ = st.columns([2, 1, 0.5])
19
  width = 800
20
  height = 600
21
 
 
15
  else:
16
  st.session_state["first_index"] = 0
17
 
18
+ row1_col1, row1_col2 = st.columns([3, 1])
19
  width = 800
20
  height = 600
21
 
apps/gee.py CHANGED
@@ -7,7 +7,7 @@ def nlcd():
7
 
8
  st.header("National Land Cover Database (NLCD)")
9
 
10
- row1_col1, row1_col2 = st.columns([2, 1])
11
  width = 950
12
  height = 600
13
 
@@ -59,7 +59,7 @@ def search_data():
59
  if "asset_titles" not in st.session_state:
60
  st.session_state["asset_titles"] = None
61
 
62
- col1, col2 = st.columns([1, 1])
63
 
64
  dataset = None
65
  with col2:
 
7
 
8
  st.header("National Land Cover Database (NLCD)")
9
 
10
+ row1_col1, row1_col2 = st.columns([3, 1])
11
  width = 950
12
  height = 600
13
 
 
59
  if "asset_titles" not in st.session_state:
60
  st.session_state["asset_titles"] = None
61
 
62
+ col1, col2 = st.columns([2, 1])
63
 
64
  dataset = None
65
  with col2:
apps/wms.py CHANGED
@@ -19,7 +19,7 @@ def app():
19
  """
20
  )
21
 
22
- row1_col1, row1_col2, _ = st.columns([2, 1, 0.5])
23
  width = 800
24
  height = 600
25
  layers = None
@@ -48,7 +48,10 @@ def app():
48
  legend = ""
49
  if add_legend:
50
  legend_text = st.text_area(
51
- "Enter a legend as a dictionary {label: color}", value=legend, height=200)
 
 
 
52
 
53
  with row1_col1:
54
  m = leafmap.Map(center=(36.3, 0), zoom=2)
 
19
  """
20
  )
21
 
22
+ row1_col1, row1_col2 = st.columns([3, 1.3])
23
  width = 800
24
  height = 600
25
  layers = None
 
48
  legend = ""
49
  if add_legend:
50
  legend_text = st.text_area(
51
+ "Enter a legend as a dictionary {label: color}",
52
+ value=legend,
53
+ height=200,
54
+ )
55
 
56
  with row1_col1:
57
  m = leafmap.Map(center=(36.3, 0), zoom=2)