Prerender labels and cache them as images

This commit is contained in:
Andreas Hocevar
2017-08-31 16:19:33 +02:00
parent 5f2b729c74
commit 35bd92b713
15 changed files with 211 additions and 258 deletions

View File

@@ -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.
*/