Class ClosestFacilityTask
Class that represents a task that can find the closest facilities around any location (incidents) on a network.
Inheritance
Implements
Namespace: Esri.ArcGISRuntime.Tasks.NetworkAnalysis
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class ClosestFacilityTask : IApiKeyResource
Remarks
The closest facility task uses a transportation network to measure the cost of traveling between incidents and facilities and determines which are nearest to one other. Finding the closest hospital to an accident, the closest police cars to a crime scene, and the closest store to a customer's address are all examples of closest facility problems. When finding closest facilities, you can specify how many to find and whether the direction of travel is toward or away from them. Once you've found the closest facilities, you can display the best route to or from them, return the travel cost for each route, and display directions to each facility. Additionally, you can specify an impedance cutoff beyond which the task should not search for a facility. For instance, you can set up a closest facility problem to search for hospitals within 15 minutes drive time of the site of an accident. Any hospitals that take longer than 15 minutes to reach will not be included in the results. The task can be created for an ArcGIS Network Analyst service hosted in the cloud on ArcGIS Online or on-premises with ArcGIS Server.
Properties
Name | Description |
---|---|
ApiKey | Gets or sets the API key that allows your app to access ArcGIS location services and private portal items. |
ClosestFacilityTaskInfo | Gets closest facility task info. |
TransportationNetworkDataset | Gets transportation network dataset. |
Uri | Gets the Uri of the online ArcGIS Network Analyst service. |
Methods
Name | Description |
---|---|
CreateAsync(TransportationNetworkDataset) | Initializes a new instance of the ClosestFacilityTask class from a transportation network dataset. |
CreateAsync(String, String) | Initializes a new instance of the ClosestFacilityTask class from a local geodatabase. |
CreateAsync(Uri) | Creates a closest facility task with the specified URL. |
CreateAsync(Uri, String) | Creates a closest facility task with the specified URL. |
CreateDefaultParametersAsync() | Creates default parameters as defined by the service. |
SolveClosestFacilityAsync(ClosestFacilityParameters) | Solves a closest facility task based on the specified parameters. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.1 - 200.6 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 200.6 |