Force state of error tiles when usInterimTilesOnError is false

This commit is contained in:
oterral
2017-05-19 15:57:59 +02:00
parent 46c610f35e
commit c1abe4a550
6 changed files with 39 additions and 18 deletions
+4
View File
@@ -144,6 +144,10 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(frameState, layer
for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
tile = tileSource.getTile(z, x, y, pixelRatio, projection);
// When useInterimTilesOnError is false, we consider the error tile as loaded.
if (tile.getState() == ol.TileState.ERROR && !this.getLayer().getUseInterimTilesOnError()) {
tile.setState(ol.TileState.LOADED);
}
if (!this.isDrawableTile_(tile)) {
tile = tile.getInterimTile();
}