Spaces:
Running
Running
File size: 748 Bytes
5ef50b1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import solara
import leafmap.maplibregl as leafmap
def create_map():
m = leafmap.Map(
style="liberty",
projection="globe",
height="750px",
zoom=2.5,
sidebar_visible=True,
)
data = "https://github.com/opengeos/datasets/releases/download/vector/countries.geojson"
first_symbol_id = m.find_first_symbol_layer()["id"]
m.add_data(
data,
column="POP_EST",
scheme="Quantiles",
cmap="Blues",
legend_title="Population",
name="Population",
before_id=first_symbol_id,
extrude=True,
scale_factor=1000,
fit_bounds=False,
)
return m
@solara.component
def Page():
m = create_map()
return m.to_solara()
|