giswqs commited on
Commit
d80ed6b
·
1 Parent(s): dcce218

Fix leafmap errors

Browse files
Files changed (3) hide show
  1. multiapp.py +2 -2
  2. requirements.txt +1 -1
  3. streamlit_app.py +1 -1
multiapp.py CHANGED
@@ -2,7 +2,7 @@
2
 
3
  import streamlit as st
4
 
5
- # app_state = st.query_params()
6
  # app_state = {k: v[0] if isinstance(v, list) else v for k, v in app_state.items()} # fetch the first item in each query string as we don't have multiple values for each query string key in this example
7
 
8
 
@@ -41,7 +41,7 @@ class MultiApp:
41
  self.apps.append({"title": title, "function": func})
42
 
43
  def run(self):
44
- app_state = st.query_params()
45
  app_state = {
46
  k: v[0] if isinstance(v, list) else v for k, v in app_state.items()
47
  } # fetch the first item in each query string as we don't have multiple values for each query string key in this example
 
2
 
3
  import streamlit as st
4
 
5
+ # app_state = st.query_params
6
  # app_state = {k: v[0] if isinstance(v, list) else v for k, v in app_state.items()} # fetch the first item in each query string as we don't have multiple values for each query string key in this example
7
 
8
 
 
41
  self.apps.append({"title": title, "function": func})
42
 
43
  def run(self):
44
+ app_state = st.query_params
45
  app_state = {
46
  k: v[0] if isinstance(v, list) else v for k, v in app_state.items()
47
  } # fetch the first item in each query string as we don't have multiple values for each query string key in this example
requirements.txt CHANGED
@@ -6,7 +6,7 @@ geopandas
6
  openpyxl
7
  streamlit>=1.34.0
8
  streamlit-option-menu
9
- leafmap
10
  # scholarpy
11
  geemap
12
  # git+https://github.com/giswqs/leafmap
 
6
  openpyxl
7
  streamlit>=1.34.0
8
  streamlit-option-menu
9
+ leafmap>=0.43.11
10
  # scholarpy
11
  geemap
12
  # git+https://github.com/giswqs/leafmap
streamlit_app.py CHANGED
@@ -33,7 +33,7 @@ apps = {
33
 
34
  titles = [app["title"] for app in apps.values()]
35
  icons = [app["icon"] for app in apps.values()]
36
- params = st.query_params()
37
 
38
  if "page" in params:
39
  default_index = int(titles.index(params["page"][0].lower()))
 
33
 
34
  titles = [app["title"] for app in apps.values()]
35
  icons = [app["icon"] for app in apps.values()]
36
+ params = st.query_params
37
 
38
  if "page" in params:
39
  default_index = int(titles.index(params["page"][0].lower()))