Render error tiles as empty
This commit is contained in:
@@ -279,11 +279,11 @@ ol.renderer.canvas.TileLayer.prototype.renderFrame =
|
|||||||
|
|
||||||
tile = tileSource.getTile(z, x, y, projection);
|
tile = tileSource.getTile(z, x, y, projection);
|
||||||
tileState = tile.getState();
|
tileState = tile.getState();
|
||||||
if (tileState == ol.TileState.LOADED || tileState == ol.TileState.EMPTY) {
|
if (tileState == ol.TileState.LOADED ||
|
||||||
|
tileState == ol.TileState.EMPTY ||
|
||||||
|
tileState == ol.TileState.ERROR) {
|
||||||
tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;
|
tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;
|
||||||
continue;
|
continue;
|
||||||
} else if (tileState == ol.TileState.ERROR) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allTilesLoaded = false;
|
allTilesLoaded = false;
|
||||||
@@ -335,7 +335,9 @@ ol.renderer.canvas.TileLayer.prototype.renderFrame =
|
|||||||
x = tileSize.width * (tile.tileCoord.x - canvasTileRange.minX);
|
x = tileSize.width * (tile.tileCoord.x - canvasTileRange.minX);
|
||||||
y = tileSize.height * (canvasTileRange.maxY - tile.tileCoord.y);
|
y = tileSize.height * (canvasTileRange.maxY - tile.tileCoord.y);
|
||||||
tileState = tile.getState();
|
tileState = tile.getState();
|
||||||
if (tileState == ol.TileState.EMPTY || !opaque) {
|
if (tileState == ol.TileState.EMPTY ||
|
||||||
|
tileState == ol.TileState.ERROR ||
|
||||||
|
!opaque) {
|
||||||
context.clearRect(x, y, tileSize.width, tileSize.height);
|
context.clearRect(x, y, tileSize.width, tileSize.height);
|
||||||
}
|
}
|
||||||
if (tileState == ol.TileState.LOADED) {
|
if (tileState == ol.TileState.LOADED) {
|
||||||
|
|||||||
Reference in New Issue
Block a user