Skip to content

Commit 4dc6f5d

Browse files
author
Stefan Kuethe
committed
Update notebooks
1 parent e8c1b82 commit 4dc6f5d

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

marimo/getting-started.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99
@app.cell
1010
def _():
11+
import marimo as mo
1112
import openlayers as ol
12-
return (ol,)
13+
return mo, ol
1314

1415

1516
@app.cell
@@ -19,8 +20,20 @@ def _(ol):
1920

2021

2122
@app.cell
22-
def _(m):
23-
m
23+
def _(m, mo):
24+
widget = mo.ui.anywidget(m)
25+
return (widget,)
26+
27+
28+
@app.cell
29+
def _(widget):
30+
widget
31+
return
32+
33+
34+
@app.cell
35+
def _(widget):
36+
widget.value["view_state"]
2437
return
2538

2639

marimo/pmtiles-vector.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
@app.cell
1010
def _():
1111
import openlayers as ol
12-
from openlayers.sources import PMTilesVectorSource
1312
from openlayers.styles import default_style
14-
return PMTilesVectorSource, default_style, ol
13+
return default_style, ol
1514

1615

1716
@app.cell
@@ -21,11 +20,11 @@ def _():
2120

2221

2322
@app.cell
24-
def _(PMTilesVectorSource, data, default_style, ol):
23+
def _(data, default_style, ol):
2524
pmtiles = ol.layers.VectorTileLayer(
2625
id="pmtiles-vector",
2726
style=default_style(stroke_color="green", stroke_width=2),
28-
source=PMTilesVectorSource(
27+
source=ol.PMTilesVectorSource(
2928
url=data, attributions=["© Land Information New Zealand"]
3029
),
3130
)

0 commit comments

Comments
 (0)