mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.24k stars 2.23k forks source link

Clusters not dividing correctly #13318

Open pizerg opened 3 weeks ago

pizerg commented 3 weeks ago

Mapbox does not seem to be honoring supercluster clusters (or there's a bug in supercluster) at some zoom levels.

mapbox-gl-js version: 3.7.0

browser: All

Steps to Trigger Behavior

Max Zoom set to 21 Cluster Max Zoom set to 21 Cluster Radius set to 50

The features set contains some points in the exact same location.

When reaching zoom level 20 the 4 points cluster should be divided in 2 subclusters but it doesn't.

Google Maps which uses the same supercluster library correctly divides the clusters at all zoom levels, the only big difference seems to be that it uses getClusters instead of getTile.

For more specific details see the links below.

Link to Demonstration

Mapbox: https://jsfiddle.net/yhd8491q Google Maps: https://jsfiddle.net/zdonchu6

Expected Behavior

Clusters should be divided according to supercluster computation

Actual Behavior

Clusters are not divided according to supercluster computation