createRouteResult static method

Future<RouteResult> createRouteResult(
  1. PortalItem portalItem
)

Imports route result from portal item.

Parameters:

  • portalItem — The portal item with feature collection that contains directions, stops, route info, and barriers tables.

Return Value: A Future that returns a RouteResult.

Implementation

static Future<RouteResult> createRouteResult(PortalItem portalItem) {
  _initializeArcGISEnvironmentIfNeeded();
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_RouteTask_createRouteResultAsync(
        portalItem._handle, errorHandler);
  });
  return taskHandle.toFuture((element) => element.getValueAsRouteResult()!);
}