From a59e4ab2ab5083799534b928575fe91f18d5d4e9 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 10 Feb 2025 01:51:56 +0100 Subject: [PATCH] Fix: don't use deprecated bbox format anymore --- src/Logic/BBox.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Logic/BBox.ts b/src/Logic/BBox.ts index e4a784415..a9734ee29 100644 --- a/src/Logic/BBox.ts +++ b/src/Logic/BBox.ts @@ -78,6 +78,9 @@ export class BBox { */ static get(feature: Feature): BBox { const f = feature + if (f.bbox?.["minLat"] !== undefined) { + delete f.bbox + } if (!f.bbox) { f.bbox = <[number, number, number, number]>bbox(f) } @@ -288,8 +291,11 @@ export class BBox { } /** - * Expands the BBOx so that it contains complete tiles for the given zoomlevel + * Expands the BBox until it contains complete tiles for the given zoomlevel * @param zoomlevel + * const bbox = new BBox([3.7140459, 51.071849, 3.7140459, 51.071849]) + * const expanded = bbox.expandToTileBounds(15) + * !isNaN(expanded.minLat) // => true */ expandToTileBounds(zoomlevel: number): BBox { if (zoomlevel === undefined) {