Improve raster reprojection behavior when tiles fail to load
This commit is contained in:
@@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user