diff --git a/js/CHANGELOG.md b/js/CHANGELOG.md index 6ed77473..09604dd8 100644 --- a/js/CHANGELOG.md +++ b/js/CHANGELOG.md @@ -1,3 +1,8 @@ +2.9.0 + +* Recognize AVIF TileType +* MapLibre adapter internally passes bounds from PMTiles header + 2.8.0 * Polyfill `DecompressionStream` using 101arrowz/compression-streams-polyfill diff --git a/js/adapters.ts b/js/adapters.ts index 82d124e1..51a8035a 100644 --- a/js/adapters.ts +++ b/js/adapters.ts @@ -123,8 +123,6 @@ export class Protocol { this.tiles.set(pmtiles_url, instance); } - // TODO: create vector_layers if present to return valid TileJSON - instance .getHeader() .then((h) => { @@ -132,6 +130,7 @@ export class Protocol { tiles: [params.url + "/{z}/{x}/{y}"], minzoom: h.minZoom, maxzoom: h.maxZoom, + bounds: [h.minLon, h.minLat, h.maxLon, h.maxLat], }; callback(null, tilejson, null, null); }) diff --git a/js/examples/leaflet.html b/js/examples/leaflet.html index c0f8f3e3..4ab06979 100644 --- a/js/examples/leaflet.html +++ b/js/examples/leaflet.html @@ -4,7 +4,7 @@ - +