isLocationOnPath static method

bool isLocationOnPath(
  1. LatLng point,
  2. List<LatLng> polyline,
  3. bool geodesic, {
  4. num tolerance = defaultTolerance,
})

Computes whether the given point lies on or near a polyline, within a specified tolerance in meters. The polyline is composed of great circle segments if geodesic is true, and of Rhumb segments otherwise. The polyline is not closed -- the closing segment between the first point and the last point is not included.

Implementation

static bool isLocationOnPath(
        LatLng point, List<LatLng> polyline, bool geodesic,
        {num tolerance = defaultTolerance}) =>
    _isLocationOnEdgeOrPath(point, polyline, false, geodesic, tolerance);