ol-mapbox-style icon indicating copy to clipboard operation
ol-mapbox-style copied to clipboard

Rendering on mobile Safari

Open soberdor opened this issue 6 years ago • 4 comments

On mobile Safari the map initially is displayed perfectly, but rendering gets stuck after a few interactions (zooming, moving), and only a page refresh helps. Probably a js error occurs, but I currently can't debug iOS. Do you know anything about this behavior or possible reasons?

(This also occurs on the openmaptiles example page (https://openmaptiles.org/docs/website/openlayers/), so it doesn't seem to be specific to my own implementation, but I also tested it using the latest OpenLayers 5.3.0 and olms.js 3.5.0 versions)

soberdor avatar Jan 07 '19 10:01 soberdor

This is caused by a Safari issue. You can find more information about the problem in openlayers/openlayers#8956.

ahocevar avatar Jan 07 '19 12:01 ahocevar

Ok thank you, this seems to be it! Unfortunately my site is still referencing ol.js without a module bundler. I realized that VectorImageTile is not included (at least under that name) in the minified ol.js. Is there any simple way to acomplish the same as in your suggested code snippet without restructuring the whole environment using modules?

soberdor avatar Jan 07 '19 15:01 soberdor

@soberdor ol.VectorImageTile is not part of the API, so what I suggested in openlayers/openlayers#8956 only works when using modules.

ahocevar avatar Jan 07 '19 15:01 ahocevar

I understand. Do you think there is any hope for an iOS update fixing this or is this Safari behavior rather intended? Could the workaround maybe be implemented in an open layers update?

soberdor avatar Jan 07 '19 18:01 soberdor