Prerender labels and cache them as images
This commit is contained in:
@@ -12,25 +12,12 @@ goog.require('ol.structs.LRUCache');
|
||||
*/
|
||||
ol.TileCache = function(opt_highWaterMark) {
|
||||
|
||||
ol.structs.LRUCache.call(this);
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
this.highWaterMark = opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;
|
||||
ol.structs.LRUCache.call(this, opt_highWaterMark);
|
||||
|
||||
};
|
||||
ol.inherits(ol.TileCache, ol.structs.LRUCache);
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean} Can expire cache.
|
||||
*/
|
||||
ol.TileCache.prototype.canExpireCache = function() {
|
||||
return this.getCount() > this.highWaterMark;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object.<string, ol.TileRange>} usedTiles Used tiles.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user