Add ol.TileCoord.clone

This commit is contained in:
Tom Payne
2012-07-07 14:27:57 +02:00
committed by Tom Payne
parent 9712c706ba
commit ff34400d96
2 changed files with 9 additions and 0 deletions

View File

@@ -123,6 +123,7 @@ MVCObject
unfreeze() unfreeze()
TileCoord TileCoord
clone() -> TileCoord
getHash() -> number getHash() -> number
Tile Tile

View File

@@ -24,6 +24,14 @@ ol.TileCoord = function(z, x, y) {
goog.inherits(ol.TileCoord, goog.math.Coordinate); goog.inherits(ol.TileCoord, goog.math.Coordinate);
/**
* @return {ol.TileCoord} Clone.
*/
ol.TileCoord.prototype.clone = function() {
return new ol.TileCoord(this.z, this.x, this.y);
};
/** /**
* @return {number} Hash. * @return {number} Hash.
*/ */