transform not marked as unmodified when map initialised with center and zoom of 0
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 0.45.0
### Steps to Trigger Behavior
1. Use a style which sets a center/zoom
2. Initialise a map using that style setting the center and zoom to 0/0/0
### Link to Demonstration
http://jsbin.com/wudona/edit?html,output
### Expected Behavior
The map should be initialised to 0/0/0.
### Actual Behavior
The map is initialsed to the center and zoom from the style.
### Workaround
The workaround is to either change the style so it doesn't have a default location, or use zoom: 0.01 or center: [0.01, 0].
### PR
I've pushed a unit test which should pass, but is now failing at https://github.com/mapbox/mapbox-gl-js/compare/center-zoom-000, I'm just not sure the best way to fix the issue.
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
Start with the unit test referenced in the issue and inspect the center/zoom initialization path in the compare branch at https://github.com/mapbox/mapbox-gl-js/compare/center-zoom-000. Confirm that initializing with center and zoom 0/0/0 overrides the style's location, matching the JSBin demonstration and expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100