Spaces:
Running
Running
File size: 832 Bytes
68eaa8c 5ef50b1 68eaa8c 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="dark-matter",
projection="globe",
height="750px",
zoom=2.5,
sidebar_visible=True,
)
m.add_ee_layer(asset_id="ESA/WorldCover/v200", opacity=0.8)
m.add_overture_3d_buildings()
m.add_legend_to_sidebar(
builtin_legend="ESA_WorldCover", title="Land Cover Type", shape_type="rectangle"
)
m.add_colorbar_to_sidebar(cmap="terrain", label="Elevation")
image = "https://i.imgur.com/KeiAsTv.gif"
m.add_image_to_sidebar(image=image, expanded=False)
video = "https://static-assets.mapbox.com/mapbox-gl-js/drone.mp4"
m.add_video_to_sidebar(video, expanded=False)
return m
@solara.component
def Page():
m = create_map()
return m.to_solara()
|