Improve type checking in ol.TileCache
This commit is contained in:
@@ -48,7 +48,7 @@ ol.TileCache.prototype.canExpireCache = function() {
|
|||||||
ol.TileCache.prototype.expireCache = function(usedTiles) {
|
ol.TileCache.prototype.expireCache = function(usedTiles) {
|
||||||
var tile, zKey;
|
var tile, zKey;
|
||||||
while (this.canExpireCache()) {
|
while (this.canExpireCache()) {
|
||||||
tile = this.peekLast();
|
tile = /** @type {ol.Tile} */ (this.peekLast());
|
||||||
zKey = tile.tileCoord.z.toString();
|
zKey = tile.tileCoord.z.toString();
|
||||||
if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {
|
if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user