getRouteStatus static method

RouteStatus getRouteStatus(
  1. TaskHandler taskHandler
)

Retrieves the current status of a route calculation.

Queries the detailed status of the calculation identified by the given TaskHandler. Returns a RouteStatus enum indicating whether the calculation is pending, calculating, ready (completed successfully), or failed/cancelled.

More detailed than isCalculationRunning, which only returns a boolean. Use this when you need to distinguish between different completion states (success vs. error) or track calculation progress in the UI.

Parameters

Returns

  • RouteStatus indicating current calculation state (e.g., calculating, ready, cancelled, failed).

See also:

Implementation

static RouteStatus getRouteStatus(final TaskHandler taskHandler) {
  taskHandler as TaskHandlerImpl;

  final OperationResult result = staticMethod(
    'RoutingService',
    'getRouteStatus',
    args: taskHandler.id,
  );
  return RouteStatusExtension.fromId(result['result']);
}