Add projection parameter to ol.source.Tile#expireCache and #useTile

This is required to be able to determine which cache the xyz coordinates
refer to (in case we have more caches).
This commit is contained in:
Petr Sloup
2015-06-10 10:38:46 +02:00
parent e0cfa1951a
commit b0694c1e3b
3 changed files with 43 additions and 7 deletions
+3 -2
View File
@@ -194,7 +194,8 @@ ol.renderer.Layer.prototype.scheduleExpireCache =
*/
function(tileSource, map, frameState) {
var tileSourceKey = goog.getUid(tileSource).toString();
tileSource.expireCache(frameState.usedTiles[tileSourceKey]);
tileSource.expireCache(frameState.viewState.projection,
frameState.usedTiles[tileSourceKey]);
}, tileSource));
}
};
@@ -327,7 +328,7 @@ ol.renderer.Layer.prototype.manageTilePyramid = function(
opt_tileCallback.call(opt_this, tile);
}
} else {
tileSource.useTile(z, x, y);
tileSource.useTile(z, x, y, projection);
}
}
}