importRouteFromHandle abstract method

  1. @Deprecated("Will be removed in v4.28.0. Use the `import_route()` methods with RoutingOptions parameter instead.")
TaskHandle importRouteFromHandle(
  1. RouteHandle routeHandle,
  2. RefreshRouteOptions refreshRouteOptions,
  3. 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.

  • routeHandle The route handle holding the route to be refreshed.

  • refreshRouteOptions The options define the vehicle and route options to calculate the route. Note An sdk.routing.RoutingError.INVALID_PARAMETER is generated when the sdk.routing.ElectricVehicleOptions.ensure_reachability option is set to true.

  • callback Callback 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

@Deprecated("Will be removed in v4.28.0. Use the `import_route()` methods with RoutingOptions parameter instead.")

TaskHandle importRouteFromHandle(RouteHandle routeHandle, RefreshRouteOptions refreshRouteOptions, CalculateRouteCallback callback);