mapbox / mapbox/mapbox-gl-js

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

Open
#12,112 0 comments 1 reaction 1 assignee View on GitHub

@mourner is already working on this.

Since Jul 26, 2022.

bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

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](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.'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.