mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

getClusterLeaves 'No cluster with the specified id.' when have features with exactly same coordinates and clusterMaxZoom: 99

Open Adjilino opened this issue 1 year ago • 0 comments

On my feature collection, I have 3 features on same coordinates, for this 3 I wanted to continue in cluster no matter the zoom level. So I changed clusterMaxZoom to 999, it works for the cluster, but now have an error when click this cluster and try to get the features using getClusterLeaves

mapbox-gl-js version: 2.9.2

browser: Microsoft Edge Version 103.0.1264.62

Steps to Trigger Behavior

  1. FeatureCollection with 2 or more features with coordinates exactly the same
  2. The Source should have cluster: true, clusterMaxZoom: 99
  3. Add a lister of click on cluster and implement source.getClusterLeaves

Link to Demonstration

https://jsbin.com/warudot/edit?html,console,output

Expected Behavior

Return all features in the cluster

Actual Behavior

Throwing error 'No cluster with the specified id.'

Adjilino avatar Jul 25 '22 13:07 Adjilino