libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/route/RouteEngine.java
public void fetchRoute(Location location, RouteProgress routeProgress) {
    if (location == null || routeProgress == null) {
      return;
    }
    this.routeProgress = routeProgress;

    Point origin = Point.fromLngLat(location.getLongitude(), location.getLatitude());
    Double bearing = location.hasBearing() ? Float.valueOf(location.getBearing()).doubleValue() : null;
    NavigationRoute.Builder builder = buildRouteRequestFromCurrentLocation(origin, bearing, routeProgress);
    if (builder != null) {
      builder
        .language(locale)
        .voiceUnits(unitType);
      builder.build().getRoute(this);
    }
  }
/**
   * Calculates a new {@link com.mapbox.api.directions.v5.models.DirectionsRoute} given
   * the current {@link Location} and {@link RouteProgress} along the route.
   * <p>
   * Uses {@link RouteOptions#coordinates()} and {@link RouteProgress#remainingWaypoints()}
   * to determine the amount of remaining waypoints there are along the given route.
   *
   * @param location      current location of the device
   * @param routeProgress for remaining waypoints along the route
   * @since 0.10.0
   */
Calculates a new  com.mapbox.api.directions.v5.models.DirectionsRoute given
the current  Location and  RouteProgress along the route.

Uses  RouteOptions#coordinates() and  RouteProgress#remainingWaypoints()
to determine the amount of remaining waypoints there are along the given route.

@param location      current location of the device
@param routeProgress for remaining waypoints along the route
@since 0.10.0
Calculates a new com . mapbox . api . directions . v5 . models . DirectionsRoute given the current Location and RouteProgress along the route . Uses RouteOptions#coordinates () and RouteProgress#remainingWaypoints () to determine the amount of remaining waypoints there are along the given route . @param location current location of the device @param routeProgress for remaining waypoints along the route @since 0 . 10 . 0
public void fetchRoute(Location location, RouteProgress routeProgress) {
    if (location == null || routeProgress == null) {
      return;
    }
    this.routeProgress = routeProgress;
    Point origin = Point.fromLngLat(location.getLongitude(), location.getLatitude());
    Double bearing = location.hasBearing() ? Float.valueOf(location.getBearing()).doubleValue() : null;
    NavigationRoute.Builder builder = buildRouteRequestFromCurrentLocation(origin, bearing, routeProgress);
    if (builder != null) {
      builder
        .language(locale)
        .voiceUnits(unitType);
      builder.build().getRoute(this);
    }
  }
public void fetchRoute ( Location location , RouteProgress routeProgress ) { if ( location == null || routeProgress == null ) { return ; } this . routeProgress = routeProgress ; Point origin = Point . fromLngLat ( location . getLongitude ( ) , location . getLatitude ( ) ) ; Double bearing = location . hasBearing ( ) ? Float . valueOf ( location . getBearing ( ) ) . doubleValue ( ) : null ; NavigationRoute . Builder builder = buildRouteRequestFromCurrentLocation ( origin , bearing , routeProgress ) ; if ( builder != null ) { builder . language ( locale ) . voiceUnits ( unitType ) ; builder . build ( ) . getRoute ( this ) ; } }
Calculates a new {@link com.mapbox.api.directions.v5.models.DirectionsRoute} given
 the current {@link Location} and {@link RouteProgress} along the route.
Calculates a new { @link com . mapbox . api . directions . v5 . models . DirectionsRoute } given the current { @link Location } and { @link RouteProgress } along the route .