From ff91d0f86c2314b1365d5fa545d35b7039ec0834 Mon Sep 17 00:00:00 2001 From: scarg0e Date: Fri, 21 Jun 2024 12:37:18 -0700 Subject: [PATCH] fix(supercluster): fixes inconsistent rounding causing clusters to not decluster at maxZoom when using fractional zooming --- src/algorithms/supercluster.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/supercluster.ts b/src/algorithms/supercluster.ts index 75336882..3ffb2735 100644 --- a/src/algorithms/supercluster.ts +++ b/src/algorithms/supercluster.ts @@ -50,7 +50,7 @@ export class SuperClusterAlgorithm extends AbstractAlgorithm { public calculate(input: AlgorithmInput): AlgorithmOutput { let changed = false; - const state = { zoom: input.map.getZoom() }; + const state = { zoom: Math.round(input.map.getZoom()) }; if (!equal(input.markers, this.markers)) { changed = true;