RouteTask

class RouteTask : ApiKeyResource, Loadable, Resourceable

A route task object is used for calculation route by specified parameters. A class that implements the route task. The route task class uses a transportation network to create a route between multiple stops. The route generated and the results returned honor the settings provided by a route settings object.

Since

200.1.0

Constructors

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

Creates a route task with path to geodatabase. Creates a route task.

constructor(dataset: TransportationNetworkDataset)

Creates a route task with path to geodatabase. Creates a route task.

constructor(url: String)

Creates a route task with URL. Creates a route task with specified service URL.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Transportation network dataset of local route task.

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. Generates default parameters.

Link copied to clipboard

Imports route parameters from feature collection and then adjusts imported parameters to current Route task. Travel mode would be null if it could not be created from the route layer settings for the route task's network. In case if travel mode is null then client can override it by another travel mode (for example obtained from RouteTaskInfo). Accumulate attributes from Route Info table going to be applied only if they exist in transportation network restriction and cost attributes.

Imports route parameters from portal item and then adjusts imported parameters to current Route task. Travel mode would be null if it could not be created from the route layer settings for the route task's network. In case if travel mode is null then client can override it by another travel mode (for example obtained from RouteTaskInfo). Accumulate attributes from Route Info table going to be applied only if they exist in transportation network restriction and cost attributes.

Link copied to clipboard

Gets route task info. Generates default parameters.

Link copied to clipboard
suspend fun solveRoute(routeParameters: RouteParameters): Result<RouteResult>

Solves a route passing in a parameters object.

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.