style's zoom level overrides map's zoom when zoom is 0
Open
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: master
browser: all
Steps to Trigger Behavior
- set the zoom level to 0 when initializing the map
- load a style with a default zoom level
Link to Demonstration
https://jsbin.com/yijetahijo/edit?html,output
Expected Behavior
Map zoom does not change (stays at zoom 0).
Actual Behavior
Map zoom changes to style's default zoom.
The same happens with center: [0, 0] as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the linked JSBin by initializing the map at zoom 0 and loading a style with a default zoom, then inspect the map initialization and style-loading path. Verify that the map remains at zoom 0; also check the reported equivalent behavior for center [0, 0].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100