Skip to content

Commit e0df7e9

Browse files
author
Stefan Kuethe
committed
Add pmtiles vector source to examples
1 parent fbd8815 commit e0df7e9

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# PMTiles vector source
2+
3+
<iframe src="https://eoda-dev.github.io/py-openlayers/marimo/pmtiles-vector.html?embed=true" width="100%" height=700 frameBorder="0"></iframe>

marimo/pmtiles-vector.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
def _():
1111
import marimo as mo
1212
import openlayers as ol
13-
from openlayers.styles import default_style
14-
return default_style, mo, ol
13+
return mo, ol
1514

1615

1716
@app.cell(hide_code=True)
@@ -33,10 +32,10 @@ def _():
3332

3433

3534
@app.cell
36-
def _(data, default_style, ol):
35+
def _(data, ol):
3736
pmtiles = ol.VectorTileLayer(
3837
id="pmtiles-vector",
39-
style=default_style(stroke_color="green", stroke_width=2),
38+
style=ol.FlatStyle(stroke_color="green", stroke_width=2),
4039
source=ol.PMTilesVectorSource(
4140
url=data, attributions=["© Land Information New Zealand"]
4241
),

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@ nav:
6060
- GPX vector source: showcase/gpx-vector-source.md
6161
- KML vector source: showcase/kml-vector-source.md
6262
- MVT tile source: showcase/mvt-tile-source.md
63+
- PMTiles vector source: showcase/pmtiles-vector-source.md
6364
# - Icons: showcase/icons.md
6465
- Changelog: changelog.md

0 commit comments

Comments
 (0)