From b9d60addb826b6e93fba614eb114b5d0481befe3 Mon Sep 17 00:00:00 2001 From: Rudo Kemper Date: Mon, 2 Feb 2026 20:31:19 -0500 Subject: [PATCH 1/2] fix: resolve type errors with mapbox v3 --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 8b52dd3..253981b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -206,7 +206,7 @@ export class PmTilesSource extends VectorTileSourceImpl { type = 'vector'; scope: string | undefined; - dispatcher = undefined; + dispatcher?: { getActor(): any }; reparseOverscaled: boolean = true; map!: MapboxMap; @@ -460,7 +460,7 @@ export class PmTilesSource extends VectorTileSourceImpl { this.fixTile(tile) if (!tile.actor || tile.state === "expired") { - tile.actor = this._tileWorkers[url] = this._tileWorkers[url] || this.dispatcher.getActor(); + tile.actor = this._tileWorkers[url] = this._tileWorkers[url] || this.dispatcher?.getActor(); tile.request = this._protocol.tile({ ...request }, afterLoad); // always load tiles on the main thread and pass the result instead of requesting a worker to do so From 61a0929ef6675641e2eb11f7f7671a35d2874a15 Mon Sep 17 00:00:00 2001 From: Rudo Kemper Date: Mon, 2 Feb 2026 20:36:12 -0500 Subject: [PATCH 2/2] chore: note Mapbox v3 requirement in readme --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3dcfe02..097e723 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,10 @@ -## Mapbox-PmTiles -Add PmTiles support to mapbox +## Mapbox-PMTiles +Add [PMTiles](https://docs.protomaps.com/pmtiles/) support to Mapbox. +This library requires Mapbox GL JS v3 to work. ## Usage @@ -126,7 +127,7 @@ import mapboxPmtiles from 'https://cdn.jsdelivr.net/npm/mapbox-pmtiles@1.0.29/+e Just pass your `pmtile` url and this plugin will detect tileset's type and format from header automatically. ;) -## What is PmTiles -See the [PmTiles](https://docs.protomaps.com/pmtiles/) repository for more information +## What is PMTiles +See the [PMTiles](https://docs.protomaps.com/pmtiles/) repository for more information