Merge pull request #401 from twpayne/coordinate-3d

Optionally extend ol.Coordinate to the third dimension
This commit is contained in:
Tom Payne
2013-03-20 05:05:14 -07:00

View File

@@ -19,9 +19,17 @@ ol.CoordinateFormatType;
* @extends {goog.math.Vec2}
* @param {number} x X.
* @param {number} y Y.
* @param {number=} opt_z Z.
*/
ol.Coordinate = function(x, y) {
ol.Coordinate = function(x, y, opt_z) {
goog.base(this, x, y);
/**
* @type {number}
*/
this.z = goog.isDef(opt_z) ? opt_z : NaN;
};
goog.inherits(ol.Coordinate, goog.math.Vec2);