solveRouteCancelable method

CancelableOperation<RouteResult> solveRouteCancelable(
  1. {required RouteParameters routeParameters}
)

Cancelable version of solveRoute. See that method for more information.

Implementation

CancelableOperation<RouteResult> solveRouteCancelable(
    {required RouteParameters routeParameters}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_RouteTask_solveRouteAsync(
        _handle, routeParameters._handle, errorHandler);
  });
  return taskHandle
      .toCancelableOperation((element) => element.getValueAsRouteResult()!);
}