Improve raster reprojection behavior when tiles fail to load

This commit is contained in:
Petr Sloup
2016-01-26 13:58:35 +01:00
parent 398a292053
commit a05c932973
+4
View File
@@ -254,6 +254,9 @@ ol.reproj.Tile.prototype.reproject_ = function() {
}, this); }, this);
this.sourceTiles_.length = 0; this.sourceTiles_.length = 0;
if (sources.length === 0) {
this.state = ol.TileState.ERROR;
} else {
var z = this.wrappedTileCoord_[0]; var z = this.wrappedTileCoord_[0];
var size = this.targetTileGrid_.getTileSize(z); var size = this.targetTileGrid_.getTileSize(z);
var width = goog.isNumber(size) ? size : size[0]; var width = goog.isNumber(size) ? size : size[0];
@@ -269,6 +272,7 @@ ol.reproj.Tile.prototype.reproject_ = function() {
this.renderEdges_); this.renderEdges_);
this.state = ol.TileState.LOADED; this.state = ol.TileState.LOADED;
}
this.changed(); this.changed();
}; };