some api change map view for example map.flyTo map.easeTo map.fitBounds and map.jumpTo proplems due to transform scale
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.3.1
**browser**:chrom
### Steps to Trigger Behavior
1. when canvas container style transform:scale(2) map.flyTo() the center is not in the center of the viewport
2.
3.
### Link to Demonstration
const map = new mapboxgl.Map({
container: "map",
style: "mapbox://styles/mapbox/streets-v11",
center: [117, 39],
zoom: 15,
});
map.on('load',()=>{
setTimeout(()=>{
map.flyTo({
center:[0,0],
zoom:9
})
},2000)
})

https://jsbin.com/
### Expected Behavior
flyTo({center}) is exicitly in the center of viewport
### Actual Behavior
flyTo({center}) is not in the center of viewport
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 supplied reproduction using mapbox-gl-js 2.3.1 in Chrome and a CSS transform:scale(2) on the canvas container. Compare map.flyTo() with map.easeTo(), map.fitBounds(), and map.jumpTo(); done means the requested center is positioned at the viewport center when the container is scaled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100