Use calculated extent

This commit is contained in:
ahocevar
2018-05-23 16:23:37 +02:00
parent 7149b6ddab
commit 64ad81cffa
2 changed files with 10 additions and 11 deletions

View File

@@ -78,6 +78,11 @@ const VectorImageTile = function(tileCoord, state, sourceRevision, format,
*/
this.tileKeys = [];
/**
* @type {module:ol/extent~Extent}
*/
this.extent = null;
/**
* @type {number}
*/
@@ -99,7 +104,7 @@ const VectorImageTile = function(tileCoord, state, sourceRevision, format,
this.sourceTileListenerKeys_ = [];
if (urlTileCoord) {
const extent = tileGrid.getTileCoordExtent(urlTileCoord);
const extent = this.extent = tileGrid.getTileCoordExtent(urlTileCoord);
const resolution = tileGrid.getResolution(tileCoord[0]);
const sourceZ = sourceTileGrid.getZForResolution(resolution);
sourceTileGrid.forEachTileCoord(extent, sourceZ, function(sourceTileCoord) {