简体   繁体   中英

OpenLayers 3: Reload failed tiles

I am using OpenLayers 3 with a Zoomify tile source. Based on various conditions I have to re-render my set of tiles on the server side and display the new set to the user as soon as possible.

What I would want to do is to display a single zoom level as soon as this is rendered on the server side, and OpenLayers automatically try to get the other tiles when they are ready. But I found that once a tile is not found OpenLayers won't try to reload it afterwards.

I am trying to do this manually and I want to catch the tileloaderror event on the Zoomify Source. The event is triggered correctly and I receive the Tile url that was not found. What would I want to do is to add a function here on a timeout to retry to load the tile but I didn't find anything in the API.

Is there any method to try to reload a tile if it fails ?

If anyone has encountered this issue, this will be supported natively by OpenLayers. Reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM