Skip to content

Commit 8b3c961

Browse files
author
Stefan Kuethe
committed
Add map to docs
1 parent a578d94 commit 8b3c961

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/concepts/map.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ Properties such as _center_, _zoom level_ and _projection_ are managed by the [V
1414
-8<-- "concepts/view.py"
1515
```
1616

17+
```python {marimo display_code=true}
18+
import marimo as mo
19+
import openlayers as ol
20+
21+
m = ol.MapWidget(ol.View(center=(172.606201, -43.556510), zoom=12))
22+
23+
w = mo.ui.anywidget(m)
24+
w
25+
```
26+
27+
```python {marimo display_code=true}
28+
w.value["view_state"]
29+
```
30+
1731
## Basemaps
1832

1933
A basemap in openlayers consists of one or more layers from your layer stack:

0 commit comments

Comments
 (0)