Skip to content

Commit b016519

Browse files
EnchiridionShannon Littleusefulthink
authored
fix: supercluster max zoom with fractional zooming (#1002)
Co-authored-by: Shannon Little <[email protected]> Co-authored-by: Martin Schuhfuss <[email protected]>
1 parent f28273c commit b016519

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/algorithms/supercluster.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ export class SuperClusterAlgorithm extends AbstractAlgorithm {
5151

5252
public calculate(input: AlgorithmInput): AlgorithmOutput {
5353
let changed = false;
54-
const zoom = input.map.getZoom();
54+
let zoom = input.map.getZoom();
5555

5656
assertNotNull(zoom);
5757

58+
zoom = Math.round(zoom);
59+
5860
const state = { zoom: zoom };
5961

6062
if (!deepEqual(input.markers, this.markers)) {

0 commit comments

Comments
 (0)