From 54d388f8fad53083562f592bf7918fcef4e2db85 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 2 Jan 2014 12:57:55 +0100 Subject: [PATCH] Make ol.source.TileImage#tileCache protected, not private --- src/ol/source/tileimagesource.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ol/source/tileimagesource.js b/src/ol/source/tileimagesource.js index dd9da53a21..a12b6ae59e 100644 --- a/src/ol/source/tileimagesource.js +++ b/src/ol/source/tileimagesource.js @@ -64,10 +64,10 @@ ol.source.TileImage = function(options) { goog.isDef(options.crossOrigin) ? options.crossOrigin : null; /** - * @private + * @protected * @type {ol.TileCache} */ - this.tileCache_ = new ol.TileCache(); + this.tileCache = new ol.TileCache(); /** * @private @@ -93,7 +93,7 @@ ol.source.TileImage.defaultTileLoadFunction = function(imageTile, src) { * @inheritDoc */ ol.source.TileImage.prototype.canExpireCache = function() { - return this.tileCache_.canExpireCache(); + return this.tileCache.canExpireCache(); }; @@ -101,7 +101,7 @@ ol.source.TileImage.prototype.canExpireCache = function() { * @inheritDoc */ ol.source.TileImage.prototype.expireCache = function(usedTiles) { - this.tileCache_.expireCache(usedTiles); + this.tileCache.expireCache(usedTiles); }; @@ -110,8 +110,8 @@ ol.source.TileImage.prototype.expireCache = function(usedTiles) { */ ol.source.TileImage.prototype.getTile = function(z, x, y, projection) { var tileCoordKey = this.getKeyZXY(z, x, y); - if (this.tileCache_.containsKey(tileCoordKey)) { - return /** @type {!ol.Tile} */ (this.tileCache_.get(tileCoordKey)); + if (this.tileCache.containsKey(tileCoordKey)) { + return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey)); } else { goog.asserts.assert(projection); var tileCoord = new ol.TileCoord(z, x, y); @@ -122,7 +122,7 @@ ol.source.TileImage.prototype.getTile = function(z, x, y, projection) { goog.isDef(tileUrl) ? tileUrl : '', this.crossOrigin_, this.tileLoadFunction_); - this.tileCache_.set(tileCoordKey, tile); + this.tileCache.set(tileCoordKey, tile); return tile; } }; @@ -135,7 +135,7 @@ ol.source.TileImage.prototype.setTileUrlFunction = function(tileUrlFunction) { // FIXME It should be possible to be more intelligent and avoid clearing the // FIXME cache. The tile URL function would need to be incorporated into the // FIXME cache key somehow. - this.tileCache_.clear(); + this.tileCache.clear(); this.tileUrlFunction = tileUrlFunction; this.dispatchChangeEvent(); }; @@ -146,7 +146,7 @@ ol.source.TileImage.prototype.setTileUrlFunction = function(tileUrlFunction) { */ ol.source.TileImage.prototype.useTile = function(z, x, y) { var tileCoordKey = this.getKeyZXY(z, x, y); - if (this.tileCache_.containsKey(tileCoordKey)) { - this.tileCache_.get(tileCoordKey); + if (this.tileCache.containsKey(tileCoordKey)) { + this.tileCache.get(tileCoordKey); } };