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?

An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services.

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.