locationIndexOnPathTolerance static method
Computes whether (and where) a given point lies on or near a polyline,
within a specified tolerance in meters.
The polyline is not closed — the closing segment between the first point and the last point is not included.
Returns -1 if the point does not lie on or near the polyline.
Returns 0 if the point is between poly[0] and poly[1] (inclusive),
1 if between poly[1] and poly[2], etc.
Implementation
static int locationIndexOnPathTolerance(Point<double> point,
List<Point<double>> poly, bool geodesic, double tolerance) =>
locationIndexOnEdgeOrPath(point, poly, false, geodesic, tolerance);