Raster tiles flicker / load twice after setStyle() when RTL plugin is loaded
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**: v1.10.1
**browser**: macOS Chrome 83.0.4103.97
### Steps to Trigger Behavior
1. Load RTL plugin + make sure RTL text is displayed somewhere.
2. Load a style with raster layer, for example satellite / satellite-streets using setStyle.
### Link to Demonstration
Modified from official example:
https://codepen.io/hyperknot/pen/XWXbLmm
Full screen is much more visible (as tiles reload kind of delayed / slowly in this bug):
https://cdpn.io/hyperknot/debug/XWXbLmm/NQMzYBLxOoRk
### Expected Behavior
There shouldn't be flickering / double loading. This is the behaviour without RTL plugin or with RTL plugin but without raster layers.
### Actual Behavior
Map loads correctly / quickly first. Then in blinks / flickers and does a somewhat slower loading from "center to screen edges" in a really uncomfortable blinking way.
A possibly related thing is that in dev tools, I can see RTL plugin loaded 4 times for each setStyle.
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 linked CodePen reproduction and compare setStyle behavior with and without the RTL plugin, especially when a raster layer is present. Trace the RTL plugin loads and raster tile loading during setStyle; done means the reproduction no longer flickers or loads tiles twice.
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