RouteTask.withGeodatabase constructor

RouteTask.withGeodatabase({
  1. required Uri pathToDatabase,
  2. required String networkName,
})

Creates a route task with path to geodatabase.

Creates a route task.

Parameters:

  • pathToDatabase — A path to geodatabase.
  • networkName — A network name.

Implementation

factory RouteTask.withGeodatabase({
  required Uri pathToDatabase,
  required String networkName,
}) {
  _initializeArcGISEnvironmentIfNeeded();
  final corePathToDatabase = _CString(pathToDatabase.toFilePath());
  final coreNetworkName = _CString(networkName);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_RouteTask_createWithGeodatabase(
      corePathToDatabase.bytes,
      coreNetworkName.bytes,
      errorHandler,
    );
  });
  return RouteTask._withHandle(handle);
}