Skip to content

Commit 9d924a7

Browse files
committed
Reordered maps
1 parent a0db848 commit 9d924a7

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

app.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,31 @@
77
"# leafmap streamlit demo"
88
st.markdown('Source code: <https://github.com/giswqs/leafmap-streamlit/blob/master/app.py>')
99

10-
"## Create a heat map"
10+
"## Create a 3D map using Kepler.gl"
1111
with st.echo():
1212
import streamlit as st
13+
import leafmap.kepler as leafmap
14+
15+
m = leafmap.Map(center=[37.7621, -122.4143], zoom=12)
16+
in_csv = 'https://raw.githubusercontent.com/giswqs/leafmap/master/examples/data/hex_data.csv'
17+
config = 'https://raw.githubusercontent.com/giswqs/leafmap/master/examples/data/hex_config.json'
18+
m.add_csv(in_csv, layer_name="hex_data", config=config)
19+
m.to_streamlit()
20+
21+
22+
"## Create a heat map"
23+
with st.echo():
1324
import leafmap.foliumap as leafmap
1425

1526
filepath = "https://raw.githubusercontent.com/giswqs/leafmap/master/examples/data/us_cities.csv"
16-
1727
m = leafmap.Map(tiles='stamentoner')
1828
m.add_heatmap(filepath, latitude="latitude", longitude='longitude', value="pop_max", name="Heat map", radius=20)
1929
m.to_streamlit(width=700, height=500, add_layer_control=True)
2030

2131

22-
2332
"## Load a GeoJSON file"
2433
with st.echo():
2534

26-
2735
m = leafmap.Map(center=[0, 0], zoom=2)
2836
in_geojson = 'https://raw.githubusercontent.com/giswqs/leafmap/master/examples/data/cable-geo.geojson'
2937
m.add_geojson(in_geojson, layer_name="Cable lines")
@@ -49,12 +57,3 @@
4957
m.to_streamlit()
5058

5159

52-
"## Create a 3D map using Kepler.gl"
53-
with st.echo():
54-
import leafmap.kepler as leafmap
55-
56-
m = leafmap.Map(center=[37.7621, -122.4143], zoom=12)
57-
in_csv = 'https://raw.githubusercontent.com/giswqs/leafmap/master/examples/data/hex_data.csv'
58-
config = 'https://raw.githubusercontent.com/giswqs/leafmap/master/examples/data/hex_config.json'
59-
m.add_csv(in_csv, layer_name="hex_data", config=config)
60-
m.to_streamlit()

0 commit comments

Comments
 (0)