OnFarmView commited on
Commit
e72f50c
·
1 Parent(s): 17b5251

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
- import leafmap.foliumap as geemap
3
- # import geemap.foliumap as geemap
4
 
5
  from streamlit.components.v1 import html
6
  import ee
@@ -35,21 +35,22 @@ footer_content = """
35
  st.sidebar.markdown(footer_content, unsafe_allow_html=True)
36
 
37
 
38
- # def ee_authenticate(token_name="EARTHENGINE_TOKEN"):
39
- # geemap.ee_initialize(token_name=token_name)
40
 
41
 
42
  map_center=(-43.525650, 172.639847)
43
- # ee_authenticate(token_name="EARTHENGINE_TOKEN")
44
 
45
  m = geemap.Map(
46
  basemap="HYBRID",
47
  plugin_Draw=True,
48
  Draw_export=True,
49
  locate_control=True,
50
- plugin_LatLngPopup=False, center=map_center, zoom=13,
 
51
  )
52
 
53
 
54
- m.to_streamlit(height=700)
55
 
 
1
  import streamlit as st
2
+ # import leafmap.foliumap as geemap
3
+ import geemap.foliumap as geemap
4
 
5
  from streamlit.components.v1 import html
6
  import ee
 
35
  st.sidebar.markdown(footer_content, unsafe_allow_html=True)
36
 
37
 
38
+ def ee_authenticate(token_name="EARTHENGINE_TOKEN"):
39
+ geemap.ee_initialize(token_name=token_name)
40
 
41
 
42
  map_center=(-43.525650, 172.639847)
43
+ ee_authenticate(token_name="EARTHENGINE_TOKEN")
44
 
45
  m = geemap.Map(
46
  basemap="HYBRID",
47
  plugin_Draw=True,
48
  Draw_export=True,
49
  locate_control=True,
50
+ plugin_LatLngPopup=True,
51
+ center=map_center, zoom=13,
52
  )
53
 
54
 
55
+ m.to_streamlit(height=600)
56