File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed
Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+
2+
3+ import marimo
4+
5+ __generated_with = "0.13.2"
6+ app = marimo .App (width = "medium" )
7+
8+
9+ @app .cell
10+ def _ ():
11+ import marimo as mo
12+ import openlayers as ol
13+ return (ol ,)
14+
15+
16+ @app .cell
17+ def _ ():
18+ icon = "https://docs.maptiler.com/openlayers/examples/geojson-points/icon-plane-512.png"
19+ return (icon ,)
20+
21+
22+ @app .cell
23+ def _ ():
24+ data = "https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_10m_airports.geojson"
25+ return (data ,)
26+
27+
28+ @app .cell
29+ def _ (icon , ol ):
30+ style = ol .FlatStyle (icon_src = icon , icon_scale = 0.03 )
31+ return (style ,)
32+
33+
34+ @app .cell
35+ def _ (data , ol , style ):
36+ vector = ol .VectorLayer (
37+ source = ol .VectorSource (url = data ),
38+ style = style
39+ )
40+ return (vector ,)
41+
42+
43+ @app .cell
44+ def _ (ol , vector ):
45+ m = ol .MapWidget (
46+ ol .View (center = (16.62662018 , 49.2125578 ), zoom = 5 ),
47+ layers = [ol .BasemapLayer (), vector ]
48+ )
49+ m .add_tooltip ()
50+ return (m ,)
51+
52+
53+ @app .cell
54+ def _ (m ):
55+ m
56+ return
57+
58+
59+ @app .cell
60+ def _ ():
61+ return
62+
63+
64+ if __name__ == "__main__" :
65+ app .run ()
You can’t perform that action at this time.
0 commit comments