js 2.9; pass header bounds through maplibre protocol

This commit is contained in:
Brandon Liu
2023-06-22 14:32:11 +08:00
parent 56f5a7c179
commit 181c9efb7e
7 changed files with 12 additions and 8 deletions

View File

@@ -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);
})