Reputation: 101
I'm struggling with an issue for several weeks about MapboxGL and layers.
I have a map with layers (raster layer)and I trigger visibility with actions (time, buttons, user gesture, etc)...
With Chrome everything is OK I can set the visibility of layers using the setLayoutProperty method.
My function doesn't work with Safari (on macOS and iOS). I reproduce the issue using mapbox official example and adding a timer on the layer visibility.
setTimeout(() => {
map.setLayoutProperty('radar-layer', "visibility", "visible");
}, 3000);
=> https://codepen.io/simon51/pen/eYWjPOz
The normal behavior : the clouds will be displayed after 3 seconds. (it works with Google Chrome and it reproduces the current issue with Safari)
Thanks for your help
Upvotes: 0
Views: 874
Reputation: 101
OK, it was a bug fixed by a very recent release of mapbox-gl (about raster image and safari) more here : https://github.com/mapbox/mapbox-gl-js/pull/10698
Upvotes: 1