Fitbounds with center option not doing expected thing
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**:2.6.1
**browser**:Chrome
### Steps to Trigger Behavior
1.create LngLatBounds as `bounds`
2 .use `map.fitBounds` and pass the `center` option to it
### Link to Demonstration
check out this link for more info:
https://jsbin.com/zodotod/edit?html,output
### Expected Behavior
The `bounds` should be in the view and the `center` of the map should be the `center` option
### Actual Behavior
Just `flyTo` the center
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 behavior in Chrome using the JSBin demonstration with mapbox-gl-js 2.6.1, then start at the map.fitBounds entry point and trace how its center option is handled. Done means the bounds remain in view while the map center matches the supplied center option, with the behavior covered by an appropriate regression check if the repository provides one.
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
- 35/100