Map Style Not Loading on iOS
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Map style doesn't completely load on ios devices causing `map.isStyleLoaded()` to never return `true`. Sources and layers that rely on the map style to be loaded never get added to the map.
On Android devices the map style finishes loading as expected.
**mapbox-gl-js version**:
v0.54.0 and v0.53.1
**browser**:
Chrome and Safari
Tested with various iphones and emulated iphones through browserstack running iOS 11 and iOS 12.
### Link to Demonstration
https://jsbin.com/hejusej
**(API key redacted)**
The jsbin outputs to the console if the style is loaded or not and retries every second.
### Expected Behavior
Video source and layer should be added to the map when `map.isStyleLoaded()` returns `true`.
### Actual Behavior
`map.isStyleLoaded()` never returns `true` on iOS devices so video source and layer are never added to the map.
Android console of jsbin using browserstack:

iOS console of jsbin using browserstack:

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 by reproducing the issue with the linked JSBin on the reported iOS and Android environments, then trace the map.isStyleLoaded() behavior in the mapbox-gl-js codebase. Confirm why the style never reaches the loaded state on iOS and verify that the video source and layer are added after the fix.
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
- 28/100