supercluster icon indicating copy to clipboard operation
supercluster copied to clipboard

Wrong expansion zoom returned by getClusterExpansionZoom

Open pizerg opened this issue 1 year ago • 1 comments

This could be reproduced with the following points (lat-lng):

Point 1: 41.3902587890625, 2.128523588180542 Point 2: 41.3902587890625, 2.128523588180542 Point 3: 41.3902904000000, 2.128565500000000 Point 4: 41.3902990000000, 2.128562400000000

Map settings: maxZoom: 21

Cluster settings: clusterMaxZoom: 21 clusterRadius: 50

When calling getClusterExpansionZoom a value of 20 is returned, however at 20 (or 21) zoom level the clusters are not expanding (at that level 2 sub clusters are returned by getClusterChildren).

Maybe related to #243 and #244

pizerg avatar Oct 03 '24 08:10 pizerg

@mourner had any chance to look at this?

Some additional info, the issue might be in getTile or in mapbox-gl-js since using supercluster with the same settings with Google Maps actually splits them in 2 clusters and the only difference seems to be that Google Maps uses getClusters while mapbox is using getTile

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

pizerg avatar Nov 05 '24 07:11 pizerg