ClosestFacilityTask

A class that implements the closest facility task. 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. When finding closest facilities, you can specify how many to find and whether the direction of travel is toward or away from them.

Since

200.1.0

See also

Constructors

Link copied to clipboard
constructor(pathToDatabase: String, networkName: String)

Creates a closest facility task with path to geodatabase.

constructor(dataset: TransportationNetworkDataset)

Creates a closest facility task with transportation network dataset.

constructor(url: String)

Creates a closest facility task with URL. Creates a closest facility task.

Properties

Link copied to clipboard

Closest facility task info. Information about this closest facility task. For a closest facility task using an online service, this will involve a network call.

Link copied to clipboard

Transportation network dataset.

Link copied to clipboard
val url: String?

The URL of online service.

Inherited properties

Link copied to clipboard
open override var apiKey: ApiKey?

The API key allows your app to access ArcGIS location services and private portal items. An API key is a unique long-lived access token that is used to authenticate and monitor requests to ArcGIS location services and private portal items. You can create and manage an API key using your portal when you sign in with an ArcGIS Location Platform account or an ArcGIS Online account with administrator access or a custom role that has the Generate API keys privilege. To learn how to create and manage API keys, go to the Create an API Key tutorial. You must ensure that your API key has the correct privileges to access secure resources.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard

Creates default parameters. Retrieves the default parameters as defined by the service.

Link copied to clipboard

Solves a closest facility passing in a parameters object. Executes the ClosestFacilityParameters defined for this ClosestFacilityTask and returns a ClosestFacilityResult containing the results.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.