importRouteFromHandle method - RoutingEngine class - routing library - Dart API
importRouteFromHandle abstract method
- RouteHandle routeHandle,
- RefreshRouteOptions refreshRouteOptions,
- CalculateRouteCallback callback
Asynchronously recreates a route from the RouteHandle provided, i.e.
refreshes a previously calculated route, with the specified RefreshRouteOptions.
A route handle can be invalid when the map data changes that is used by the HERE backend to recreate the route. This happens regularly. Therefore, the route handle is not meant to be persisted for a longer time. Instead, a possible use case can be to plan a route with another HERE service. For example, a HERE REST API that allows to calculate a route on a desktop. Then this route can be transferred via the handle to a mobile device for further use with the HERE SDK.
-
routeHandleThe route handle holding the route to be refreshed. -
refreshRouteOptionsThe options define the vehicle and route options to calculate the route. Note Ansdk.routing.RoutingError.INVALID_PARAMETERis generated when thesdk.routing.EVCarOptions.ensure_reachabilityoption is set totrue. -
callbackCallback object that will be invoked after refreshing the route. It is always invoked on the main thread.
Returns TaskHandle. Handle that will be used to manipulate the execution of the task.
Implementation
TaskHandle importRouteFromHandle(RouteHandle routeHandle, RefreshRouteOptions refreshRouteOptions, CalculateRouteCallback callback);