Add ol.geom.LineString#getCoordinateAtM

This commit is contained in:
Tom Payne
2014-01-29 01:22:33 +01:00
parent 6781a6cef3
commit c218d5d4e8
2 changed files with 13 additions and 0 deletions

View File

@@ -80,6 +80,18 @@ ol.geom.LineString.prototype.closestPointXY =
};
/**
* @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate.
* @return {ol.Coordinate} Coordinate.
*/
ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
var extrapolate = goog.isDef(opt_extrapolate) ? opt_extrapolate : false;
return ol.geom.flat.lineStringCoordinateAtM(this.flatCoordinates, 0,
this.flatCoordinates.length, this.stride, this.layout, m, extrapolate);
};
/**
* @return {ol.geom.RawLineString} Coordinates.
* @todo stability experimental