findNearestRouteIndex method

int findNearestRouteIndex(
  1. LatLng tapLocation, {
  2. double maxDistanceMeters = 35.0,
  3. double? zoom,
  4. double touchRadiusPixels = 56.0,
})

Finds the route index whose polyline is closest to tapLocation.

Implementation

int findNearestRouteIndex(
  LatLng tapLocation, {
  double maxDistanceMeters = 35.0,
  double? zoom,
  double touchRadiusPixels = 56.0,
}) {
  return routing.findNearestRouteIndex(
    tapLocation,
    maxDistanceMeters: maxDistanceMeters,
    zoom: zoom,
    touchRadiusPixels: touchRadiusPixels,
  );
}