Skip to content

Commit 5ace334

Browse files
author
Stefan Kuethe
committed
Update example
1 parent 6a06973 commit 5ace334

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/concepts/controls.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ Controls are user interface elements that you can add to your map:
88

99
> See [Controls API](../../api/controls/)
1010
11+
```python {marimo}
12+
import micropip
13+
await micropip.install("openlayers")
14+
```
15+
1116
```python {marimo display_code=True}
1217
import openlayers as ol
13-
from openlayers.basemaps import CartoBasemapLayer
1418

1519
m = ol.MapWidget(
16-
layers=[CartoBasemapLayer()],
17-
controls=[ol.OverviewMapControl(collapsed=False)]
20+
controls=[
21+
ol.ZoomToExtentControl(),
22+
ol.ScaleLineControl()
23+
]
1824
)
1925
m
2026
```

0 commit comments

Comments
 (0)