Skip to content

Commit ff91d0f

Browse files
committed
fix(supercluster): fixes inconsistent rounding causing clusters to not decluster at maxZoom when using fractional zooming
1 parent c5cdf54 commit ff91d0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/algorithms/supercluster.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class SuperClusterAlgorithm extends AbstractAlgorithm {
5050

5151
public calculate(input: AlgorithmInput): AlgorithmOutput {
5252
let changed = false;
53-
const state = { zoom: input.map.getZoom() };
53+
const state = { zoom: Math.round(input.map.getZoom()) };
5454

5555
if (!equal(input.markers, this.markers)) {
5656
changed = true;

0 commit comments

Comments
 (0)