mapbox / mapbox/mapbox-gl-js

getClusterExpansionZoom() is inaacurate with projections

Open
#11,242 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**mapbox-gl-js version**: v2.6.0-beta.2

**browser**:Any

### Steps to Trigger Behavior

1. Use `http://localhost:9966/debug/cluster`
2. Set the projection `map.setProjection('equirectangular')` in the console
3. Click on a large cluser

### Link to Demonstration

on `equirectangular`:

https://user-images.githubusercontent.com/1449257/140556912-a35ae4bd-036e-4f1a-8501-30eb52d7cc04.mov

on `mercator`:

https://user-images.githubusercontent.com/1449257/140556931-b84096d2-fc62-4f88-ba0c-4337b6e095f3.mov

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.

Research direction

Start with the debug/cluster entry point and reproduce the reported behavior using map.setProjection('equirectangular') before clicking a large cluster. Trace getClusterExpansionZoom() for equirectangular and mercator projections, then verify the expansion zoom is accurate in both cases with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.