Move layout test in ol.geom.LineString

This commit is contained in:
Tom Payne
2014-03-02 11:35:15 +01:00
parent c3cad6b6fa
commit 2d9091856c
2 changed files with 7 additions and 6 deletions

View File

@@ -86,9 +86,13 @@ ol.geom.LineString.prototype.closestPointXY =
* @return {ol.Coordinate} Coordinate.
*/
ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
if (this.layout != ol.geom.GeometryLayout.XYM &&
this.layout != ol.geom.GeometryLayout.XYZM) {
return null;
}
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);
this.flatCoordinates.length, this.stride, m, extrapolate);
};