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
+7 -2
View File
@@ -98,10 +98,14 @@ ol.source.Tile.prototype.canExpireCache = function() {
/**
* @param {ol.proj.Projection} projection
* @param {Object.<string, ol.TileRange>} usedTiles Used tiles.
*/
ol.source.Tile.prototype.expireCache = function(usedTiles) {
this.tileCache.expireCache(usedTiles);
ol.source.Tile.prototype.expireCache = function(projection, usedTiles) {
var tileCache = this.getTileCacheForProjection(projection);
if (!goog.isNull(tileCache)) {
tileCache.expireCache(usedTiles);
}
};
@@ -267,6 +271,7 @@ ol.source.Tile.prototype.getTileCoordForTileUrlFunction =
* @param {number} z Tile coordinate z.
* @param {number} x Tile coordinate x.
* @param {number} y Tile coordinate y.
* @param {ol.proj.Projection} projection Projection.
*/
ol.source.Tile.prototype.useTile = ol.nullFunction;