Merge pull request #1037 from fredj/perf

ol.TileCoord.getKeyZXY optimization
This commit is contained in:
Frédéric Junod
2013-09-18 09:16:28 -07:00
2 changed files with 2 additions and 4 deletions

View File

@@ -111,9 +111,7 @@ ol.source.Tile.prototype.findLoadedTiles = function(loadedTilesByZ,
* @return {string} Key.
* @protected
*/
ol.source.Tile.prototype.getKeyZXY = function(z, x, y) {
return ol.TileCoord.getKeyZXY(z, x, y);
};
ol.source.Tile.prototype.getKeyZXY = ol.TileCoord.getKeyZXY;
/**

View File

@@ -109,7 +109,7 @@ ol.TileCoord.createOrUpdate = function(z, x, y, tileCoord) {
* @return {string} Key.
*/
ol.TileCoord.getKeyZXY = function(z, x, y) {
return [z, x, y].join('/');
return z + '/' + x + '/' + y;
};