createRouteResultWithFeatureCollection static method
- {required FeatureCollection collection}
Imports route result from feature collection.
Parameters:
collection
— The feature collection that contains directions, stops, route info, and barriers tables.
Return Value: A Future that returns a RouteResult
.
Implementation
static Future<RouteResult> createRouteResultWithFeatureCollection(
{required FeatureCollection collection}) {
_initializeArcGISEnvironmentIfNeeded();
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore
.RT_RouteTask_createRouteResultWithFeatureCollectionAsync(
collection._handle, errorHandler);
});
return taskHandle.toFuture((element) => element.getValueAsRouteResult()!);
}