update

fun update(    routeOptions: RouteOptions?,     routeProgress: RouteProgress?,     locationMatcherResult: LocationMatcherResult?): RouteOptionsUpdater.RouteOptionsResult

Provides a new RouteOptions instance based on the original request options, the current route progress and location matcher result.

This carries over or adapts all of the request parameters to best fit the existing situation and remaining portion of the route.

Notable adjustments:

  • snapping_include_closures=true and snapping_include_static_closures=true are set for the origin of the request to aid with potential need to navigate out of a closed section of the road

  • depart_at/arrive_by parameters are cleared as they are not applicable in update/re-route scenario

Return

RouteOptionsResult.Error if a new RouteOptions instance cannot be combined based on the input given. RouteOptionsResult.Success with a new RouteOptions instance if successfully combined.