You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers
21
-
* @returns {Feature<Point>} closest point on the `line` to `point`. The properties object will contain four values: `index`: closest point was found on nth line part, `multiFeatureIndex`: closest point was found on the nth line of the `MultiLineString`, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point.
21
+
* @returns {Feature<Point>} closest point on the `line` to `point`. The properties object will contain four values: `index`: closest point was found on nth line part, `multiFeatureIndex`: closest point was found on the nth line of the `MultiLineString`, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point, `multiFeatureLocation`: distance along the line between start of the `MultiLineString` where closest point was found and the closest point.
22
22
* @example
23
23
* var line = turf.lineString([
24
24
* [-77.031669, 38.878605],
@@ -47,6 +47,7 @@ function nearestPointOnLine<G extends LineString | MultiLineString>(
47
47
index: number;
48
48
multiFeatureIndex: number;
49
49
location: number;
50
+
multiFeatureLocation: number;
50
51
[key: string]: any;
51
52
}
52
53
>{
@@ -58,18 +59,33 @@ function nearestPointOnLine<G extends LineString | MultiLineString>(
0 commit comments