mapbox / mapbox/mapbox-gl-js

Pinch zoom isn't working with Albers projection (even after transition to Mercator) and pitch

Open
#11,241 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**: main / v2.6.0-beta.2

**browser**: iOS Safari

### Steps to Trigger Behavior

1. open `http://localhost:9966/debug/debug.html`
2. `map.setProjection('albers')`
3. Pitch the map a bit (~60)
4. Start pinching the map at high zoom/low zoom
5. At high zoom switch to `map.setProjection('mercator')` and compare the behavior

### Expected Behavior

- The map is at least working similarly between Albers transitioned to Mercator and Mercator at high zoom
- Pinch zoom gesture behaves correctly at low zoom under Albers

### Actual Behavior

- At high zoom the map behaves differently than Mercator (when switching the projection on/off)
- At low zoom the map is hard to use when using pinch zoom gesture
https://user-images.githubusercontent.com/1449257/140555681-4e3921bc-a798-4c26-8a55-a3842e55ef6b.mp4

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

Reproduce the issue in debug/debug.html on iOS Safari using map.setProjection('albers'), pitch around 60, and pinch zoom at high and low zoom. Compare the behavior after switching to map.setProjection('mercator'). Done means pinch zoom behaves correctly at low Albers zoom and is consistent with Mercator after the transition.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.