backToRoute
Synchronously plans a route to return to the original route using the provided BackToRouteOptions object.
This method calculates a new route that includes a short path to quickly get you back to the original route after deviating from it, followed by the remaining part of the original route. The BackToRouteOptions specifies the original route, the deviation point, and the current location required to perform the calculation.
Important: This is a Public Preview API. It may be changed or removed at any time.
Return
If the call succeeds, returns a BackToRouteResponse. If it fails, returns a RoutingFailure.
Parameters
The object containing the options needed to plan a back-to-route.
Asynchronously plans a route to return to the original route using the provided BackToRouteOptions object.
This method calculates a new route that includes a short path to quickly get you back to the original route after deviating from it, followed by the remaining part of the original route. The BackToRouteOptions specifies the original route, the deviation point, and the current location required to perform the calculation. If the operation succeeds, BackToRouteCallback.onSuccess is called with a BackToRouteResponse. If the operation fails, BackToRouteCallback.onFailure is called with a RoutingFailure.
Important: This is a Public Preview API. It may be changed or removed at any time.
Return
cancellable operation.
Parameters
The route options needed to plan a route.
The BackToRouteCallback invoked after each route has been planned and when planning of all routes has finished, either successfully or with an error. The callback will be executed on the main thread.