mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.24k stars 2.23k forks source link

Map Style Not Loading on iOS #8209

Open nathan-myhre opened 5 years ago

nathan-myhre commented 5 years ago

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: browserstack-android-console

iOS console of jsbin using browserstack: browserstack-ios-console

bellaXpanner commented 4 months ago

I'm experiencing the same issue. Has this problem been resolved?