Respect cacheSize for reprojected caches

This commit is contained in:
Andreas Hocevar
2017-03-22 15:50:58 +01:00
parent 57e67e62bb
commit 07d4492ece
4 changed files with 22 additions and 5 deletions

View File

@@ -15,10 +15,9 @@ ol.TileCache = function(opt_highWaterMark) {
ol.structs.LRUCache.call(this);
/**
* @private
* @type {number}
*/
this.highWaterMark_ = opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;
this.highWaterMark = opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;
};
ol.inherits(ol.TileCache, ol.structs.LRUCache);
@@ -28,7 +27,7 @@ ol.inherits(ol.TileCache, ol.structs.LRUCache);
* @return {boolean} Can expire cache.
*/
ol.TileCache.prototype.canExpireCache = function() {
return this.getCount() > this.highWaterMark_;
return this.getCount() > this.highWaterMark;
};