libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/offroute/OffRouteDetector.java
private static boolean closeToUpcomingStep(MapboxNavigationOptions options, OffRouteCallback callback,
                                             Point currentPoint, LegStep upComingStep) {
    boolean isCloseToUpcomingStep;
    if (upComingStep != null) {
      double distanceFromUpcomingStep = userTrueDistanceFromStep(currentPoint, upComingStep);
      double maneuverZoneRadius = options.maneuverZoneRadius();
      isCloseToUpcomingStep = distanceFromUpcomingStep < maneuverZoneRadius;
      if (isCloseToUpcomingStep) {
        // Callback to the NavigationEngine to increase the step index
        callback.onShouldIncreaseIndex();
        return true;
      }
    }
    return false;
  }
/**
   * If the upcoming step is not null, detect if the current point
   * is within the maneuver radius.
   * <p>
   * If it is, fire {@link OffRouteCallback#onShouldIncreaseIndex()} to increase the step
   * index in the <tt>NavigationEngine</tt> and return true.
   *
   * @param options      for maneuver zone radius
   * @param callback     to increase step index
   * @param currentPoint for distance from upcoming step
   * @param upComingStep for distance from current point
   * @return true if close to upcoming step, false if not
   */
If the upcoming step is not null, detect if the current point
is within the maneuver radius.

If it is, fire  OffRouteCallback#onShouldIncreaseIndex() to increase the step
index in the NavigationEngine and return true.


If the upcoming step is not null detect if the current point is within the maneuver radius . If it is fire OffRouteCallback#onShouldIncreaseIndex () to increase the step index in the NavigationEngine and return true .
private static boolean closeToUpcomingStep(MapboxNavigationOptions options, OffRouteCallback callback,
                                             Point currentPoint, LegStep upComingStep) {
    boolean isCloseToUpcomingStep;
    if (upComingStep != null) {
      double distanceFromUpcomingStep = userTrueDistanceFromStep(currentPoint, upComingStep);
      double maneuverZoneRadius = options.maneuverZoneRadius();
      isCloseToUpcomingStep = distanceFromUpcomingStep < maneuverZoneRadius;
      if (isCloseToUpcomingStep) {
        callback.onShouldIncreaseIndex();
        return true;
      }
    }
    return false;
  }
private static boolean closeToUpcomingStep ( MapboxNavigationOptions options , OffRouteCallback callback , Point currentPoint , LegStep upComingStep ) { boolean isCloseToUpcomingStep ; if ( upComingStep != null ) { double distanceFromUpcomingStep = userTrueDistanceFromStep ( currentPoint , upComingStep ) ; double maneuverZoneRadius = options . maneuverZoneRadius ( ) ; isCloseToUpcomingStep = distanceFromUpcomingStep < maneuverZoneRadius ; if ( isCloseToUpcomingStep ) { callback . onShouldIncreaseIndex ( ) ; return true ; } } return false ; }
If the upcoming step is not null, detect if the current point
 is within the maneuver radius.
If the upcoming step is not null detect if the current point is within the maneuver radius .
// Callback to the NavigationEngine to increase the step index