Merge pull request #6832 from oterral/fix_5269

Force state of error tiles when usInterimTilesOnError is false
This commit is contained in:
Frédéric Junod authored and GitHub committed 2017-05-24 15:27:11 +02:00
commit aeed1f79bb
6 files changed
+39 -18

No files matched your search

+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();
}