Py.Cafe

s1143002/

11/27

Creating Interactive Map Apps with Streamlit on Py.cafe

DocsPricing
  • app.py
  • requirements.txt
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import streamlit as st
import leafmap.foliumap as leafmap

st.title("split map")
st.markdown(
    """
    Hello
    """
)

m = leafmap.Map()
m.split_map(
    left_layer='https://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', right_layer='ESA WorldCover 2020'
)
m.add_legend(title='ESA Land Cover', builtin_legend='ESA_WorldCover')
m.to_streamlit(height=500)