Preloading maptiles for camera animation stopped working
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**: 3.9.3, also confirmed in 3.6
**browser**: Chrome & Firefox confirmed
### Steps to Trigger Behavior
1. Add a mapboxgljs map
2. Preload maptiles and await idle before running flyTo.
Code example:
```js
map.flyTo({center: [-119.5375, 37.7425], preloadOnly: true});
await map.once('idle');
map.flyTo({center: [-119.5375, 37.7425]});
```
### Expected Behavior
Maptiles should be preloaded before animation starts for a smooth animation.
### Actual Behavior
Animation runs instantly, tiles are not preloaded. Resulting in a laggy animation.
The lag is more visible on a less performant device, such as a mobile phone.
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 provided mapbox-gl-js reproduction using flyTo({preloadOnly: true}) and the idle event, then compare it with the following animated flyTo call in Chrome and Firefox. Confirm that tiles are loaded before animation begins and that the animation is no longer instantaneous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, 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