Merge pull request #1487 from fredj/cleanup

ol.TileCoord: add @struct annotation and use the ol.TileCoord.createOrUpdate function
This commit is contained in:
Frédéric Junod
2014-01-08 04:40:53 -08:00
3 changed files with 3 additions and 16 deletions
+1
View File
@@ -21,6 +21,7 @@ ol.QuadKeyCharCode = {
* @param {number} z Zoom level. * @param {number} z Zoom level.
* @param {number} x X. * @param {number} x X.
* @param {number} y Y. * @param {number} y Y.
* @struct
*/ */
ol.TileCoord = function(z, x, y) { ol.TileCoord = function(z, x, y) {
+1 -8
View File
@@ -89,14 +89,7 @@ ol.tilegrid.XYZ.prototype.createTileCoordTransform = function(opt_options) {
return null; return null;
} }
} }
if (goog.isDef(opt_tileCoord)) { return ol.TileCoord.createOrUpdate(z, x, -y - 1, opt_tileCoord);
opt_tileCoord.z = z;
opt_tileCoord.x = x;
opt_tileCoord.y = -y - 1;
return opt_tileCoord;
} else {
return new ol.TileCoord(z, x, -y - 1);
}
}); });
}; };
+1 -8
View File
@@ -74,13 +74,6 @@ ol.tilegrid.Zoomify.prototype.createTileCoordTransform = function(opt_options) {
return null; return null;
} }
} }
if (goog.isDef(opt_tileCoord)) { return ol.TileCoord.createOrUpdate(z, x, -y - 1, opt_tileCoord);
opt_tileCoord.z = z;
opt_tileCoord.x = x;
opt_tileCoord.y = -y - 1;
return opt_tileCoord;
} else {
return new ol.TileCoord(z, x, -y - 1);
}
}); });
}; };