I have an OpenLayers XYZ-layer. When loading the layer some of the tiles does not show up. However if I reload the tile it shows up (a.k.a there is nothing wrong with the tile). Seems to me OpenLayers has some kind of timeout mechanism, and won't render the tile if it takes too long.
Does anybody know how to increase the ti开发者_如何学JAVAmeout ?
I think that is not possible to do that. I had the same problem few months ago, and the best solution I found was to set OpenLayers.IMAGE_RELOAD_ATTEMPTS
constant.
OpenLayers.IMAGE_RELOAD_ATTEMPTS
is a variable to specify how many times do you want to try to reload tiles when its reach timeout.
You just need to include this sentence at top of your own code and playing with its value to set the best for you:
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
I hope it helps.
精彩评论