A task to find a closest facility route between facilities and incidents. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.1 |
Inherits: |
Properties
- apiKey : string
- closestFacilityTaskInfo : ClosestFacilityTaskInfo
- createDefaultParametersResult : ClosestFacilityParameters
- createDefaultParametersStatus : Enums.TaskStatus
- credential : Credential
- error : Error
- loadError : Error
- loadStatus : Enums.LoadStatus
- networkName : string
- requestConfiguration : RequestConfiguration
- solveClosestFacilityResult : ClosestFacilityResult
- solveClosestFacilityStatus : Enums.TaskStatus
- transportationNetworkDataset : TransportationNetworkDataset
- url : url
Signals
- apiKeyChanged()
- closestFacilityTaskInfoChanged()
- createDefaultParametersStatusChanged()
- credentialChanged()
- loadErrorChanged()
- loadStatusChanged()
- networkNameChanged()
- requestConfigurationChanged()
- solveClosestFacilityStatusChanged()
- transportationNetworkDatasetChanged()
- urlChanged()
Methods
- void cancelLoad()
- bool cancelTask(string taskId)
- void createDefaultParameters()
- void load()
- void retryLoad()
- string solveClosestFacility(ClosestFacilityParameters closestFacilityParameters)
Detailed Description
The closest facility task class uses a transportation network to measure the cost of traveling between incidents and facilities and determines which are nearest to one other in terms of cost. When finding closest facilities, you can specify how many to find and whether the direction of travel is toward or away from them. You can also provide impedance attributes to be considered when calculating route cost. ClosestFacilityTask is executed asynchronously. A successful execution returns a ClosestFacilityResult instance with details about the closest facility route.
The closest facility task works in an online connected scenario by using a transportation network that is published to ArcGIS Server as an online Network Analyst closest facility service. Esri also provides ready-to-use services, such as the Directions and Routing Services, which requires authentication with an ArcGIS organizational account. In connected scenarios, provide a URL to the REST endpoint of the service, along with any necessary credentials.
An example of an online ClosestFacilityTask:
ClosestFacilityTask {
id: onlineClosestFacilityTask
url: "https://www.myServer.com/arcgis/rest/services/routing/NAServer/Closest%20Facility"
}
This QML type supports the following default properties. A default property is the property to which a value is assigned if an object of a specific QML type is declared within another object's declaration without declaring it as a value for a particular property.
Type | Default Property |
---|---|
Credential | credential |
RequestConfiguration | requestConfiguration |
See also ApiKeyResource, Cancelable, Loadable, RemoteResource, and Closest Facility REST API documentation.
Property Documentation
Returns the API key.
This property was introduced in Esri.ArcGISRuntime 100.10.
See also ApiKeyResource.
closestFacilityTaskInfo : ClosestFacilityTaskInfo |
Returns ClosestFacilityTaskInfo about the ClosestFacilityTask (read-only).
Wait until the ClosestFacilityTask is loaded
before attempting to obtain the ClosestFacilityTaskInfo.
createDefaultParametersResult : ClosestFacilityParameters |
Results from createDefaultParameters(), giving access to the default ClosestFacilityParameters (read-only).
Obtain this property after the createDefaultParametersStatusChanged signal emits, and the createDefaultParametersStatus is complete.
Returns the current status of the createDefaultParameters method (read-only).
Wait until the createDefaultParametersStatus is Enums.TaskStatusComplete
before obtaining the createDefaultParametersResult.
See also Enums.TaskStatus.
[default] credential : Credential |
The Credential for authenticating against a secured service.
Only applicable if using an online service that is secured.
loadError : Error |
Returns the load error (read-only).
Note: load errors are also reported on the error
property and emit the errorChanged
signal.
See also Loadable.
Returns the load status (read-only).
See also Loadable and Enums.LoadStatus.
The network dataset's name in the mobile geodatabase.
Note: This property is only used for offline routing.
This property was introduced in Esri.ArcGISRuntime 100.2.
[default] requestConfiguration : RequestConfiguration |
The configuration parameters used for network requests sent by this task.
solveClosestFacilityResult : ClosestFacilityResult |
Results from solveClosestFacility, giving access to the output ClosestFacilityResult (read-only).
Obtain this property after the solveClosestFacilityStatusChanged signal emits, and the solveClosestFacilityStatus is complete.
Returns the current status of the solveClosestFacility method (read-only).
Wait until the solveClosestFacilityStatus is Enums.TaskStatusComplete
before obtaining the solveClosestFacilityResult.
See also Enums.TaskStatus.
transportationNetworkDataset : TransportationNetworkDataset |
The transportation network dataser in the mobile geodatabase.
Note: This property is only used for offline routing.
This property was introduced in Esri.ArcGISRuntime 100.2.
Signal Documentation
Emitted when the apiKey property changes.
Note: The corresponding handler is onApiKeyChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.10.
See also ApiKeyResource.
Emitted when the closestFacilityTaskInfo property of this ClosestFacilityTask changes.
Note: The corresponding handler is onClosestFacilityTaskInfoChanged
.
Emitted when the createDefaultParametersStatus property of this ClosestFacilityTask changes.
Note: The corresponding handler is onCreateDefaultParametersStatusChanged
.
Emitted when the credential property of this ClosestFacilityTask changes.
Note: The corresponding handler is onCredentialChanged
.
Emitted when the loadError property of this ClosestFacilityTask changes.
Note: load errors are also reported on the error
property and emit the errorChanged
signal.
Note: The corresponding handler is onLoadErrorChanged
.
Emitted when the loadStatus property of this ClosestFacilityTask changes.
Note: The corresponding handler is onLoadStatusChanged
.
See also Loadable.
Emitted when the networkName property of this ClosestFacilityTask changes.
Note: The corresponding handler is onNetworkNameChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.2.
Emitted when the requestConfiguration property changes.
Note: The corresponding handler is onRequestConfigurationChanged
.
Emitted when the solveClosestFacilityStatus property of this ClosestFacilityTask changes.
Note: The corresponding handler is onSolveClosestFacilityStatusChanged
.
Emitted when the transportationNetworkDataset property changes.
Note: The corresponding handler is onTransportationNetworkDatasetChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.2.
Emitted when the url property of this ClosestFacilityTask changes.
Note: The corresponding handler is onUrlChanged
.
Method Documentation
See also Loadable.
Cancel the task with the ID taskId.
Returns false
if the task cannot be canceled or there is no task with the specified id taskId.
See also Cancelable.
Creates default closest facility parameters from the service.
The createDefaultParametersStatusChanged signal will emit once the operation is complete, giving access to the createDefaultParametersResult.
See also Loadable.
See also Loadable.
string solveClosestFacility(ClosestFacilityParameters closestFacilityParameters) |
Solves a closest facility with the given closestFacilityParameters.
The solveClosestFacilityStatusChanged signal will emit when the operation is complete, giving access to the solveClosestFacilityResult.