Functions in ol.geom.flat.interpolate namespace

This commit is contained in:
Tim Schaub
2016-12-03 10:45:52 -08:00
parent 37c445275f
commit fda2d8e40e
3 changed files with 7 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, str
* @param {boolean} extrapolate Extrapolate.
* @return {ol.Coordinate} Coordinate.
*/
ol.geom.flat.lineStringCoordinateAtM = function(flatCoordinates, offset, end, stride, m, extrapolate) {
ol.geom.flat.interpolate.lineStringCoordinateAtM = function(flatCoordinates, offset, end, stride, m, extrapolate) {
if (end == offset) {
return null;
}
@@ -147,10 +147,10 @@ ol.geom.flat.lineStringCoordinateAtM = function(flatCoordinates, offset, end, st
* @param {boolean} interpolate Interpolate.
* @return {ol.Coordinate} Coordinate.
*/
ol.geom.flat.lineStringsCoordinateAtM = function(
ol.geom.flat.interpolate.lineStringsCoordinateAtM = function(
flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {
if (interpolate) {
return ol.geom.flat.lineStringCoordinateAtM(
return ol.geom.flat.interpolate.lineStringCoordinateAtM(
flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);
}
var coordinate;
@@ -181,12 +181,12 @@ ol.geom.flat.lineStringsCoordinateAtM = function(
if (m < flatCoordinates[offset + stride - 1]) {
return null;
} else if (m <= flatCoordinates[end - 1]) {
return ol.geom.flat.lineStringCoordinateAtM(
return ol.geom.flat.interpolate.lineStringCoordinateAtM(
flatCoordinates, offset, end, stride, m, false);
}
offset = end;
}
ol.DEBUG && console.assert(false,
'ol.geom.flat.lineStringsCoordinateAtM should have returned');
'ol.geom.flat.interpolate.lineStringsCoordinateAtM should have returned');
return null;
};

View File

@@ -147,7 +147,7 @@ ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
return null;
}
var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
return ol.geom.flat.lineStringCoordinateAtM(this.flatCoordinates, 0,
return ol.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates, 0,
this.flatCoordinates.length, this.stride, m, extrapolate);
};

View File

@@ -134,7 +134,7 @@ ol.geom.MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate
}
var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;
return ol.geom.flat.lineStringsCoordinateAtM(this.flatCoordinates, 0,
return ol.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates, 0,
this.ends_, this.stride, m, extrapolate, interpolate);
};