Consistent use of ol.tilecoord.getKeyZXY()

This commit is contained in:
Tim Schaub
2017-10-07 12:37:55 -06:00
parent 5a1effb483
commit 177fcc7bcc
8 changed files with 19 additions and 23 deletions

View File

@@ -9,6 +9,7 @@ goog.require('ol.events.EventType');
goog.require('ol.proj');
goog.require('ol.reproj.Tile');
goog.require('ol.source.UrlTile');
goog.require('ol.tilecoord');
goog.require('ol.tilegrid');
@@ -245,7 +246,7 @@ ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection
var cache = this.getTileCacheForProjection(projection);
var tileCoord = [z, x, y];
var tile;
var tileCoordKey = this.getKeyZXY.apply(this, tileCoord);
var tileCoordKey = ol.tilecoord.getKey(tileCoord);
if (cache.containsKey(tileCoordKey)) {
tile = /** @type {!ol.Tile} */ (cache.get(tileCoordKey));
}
@@ -293,7 +294,7 @@ ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection
*/
ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
var tile = null;
var tileCoordKey = this.getKeyZXY(z, x, y);
var tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
var key = this.getKey();
if (!this.tileCache.containsKey(tileCoordKey)) {
tile = this.createTile_(z, x, y, pixelRatio, projection, key);