ClosestFacilityTask.withGeodatabase constructor
Creates a closest facility task with path to geodatabase.
Parameters:
databaseFileUri
— A path to geodatabase.networkName
— A network name.
Implementation
factory ClosestFacilityTask.withGeodatabase(
{required Uri databaseFileUri, required String networkName}) {
_initializeArcGISEnvironmentIfNeeded();
final coreDatabaseFileUri = _CString(databaseFileUri.toFilePath());
final coreNetworkName = _CString(networkName);
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_ClosestFacilityTask_createWithGeodatabase(
coreDatabaseFileUri.bytes, coreNetworkName.bytes, errorHandler);
});
return ClosestFacilityTask._withHandle(handle);
}