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.

See also

Constructors

Link copied to clipboard
fun RouteTask(pathToDatabase: String, networkName: String)

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

Link copied to clipboard
fun RouteTask(dataset: TransportationNetworkDataset)

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

Link copied to clipboard
fun RouteTask(url: String)

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

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
suspend fun createDefaultParameters(): Result<RouteParameters>

Creates default parameters. Generates default parameters.

Link copied to clipboard
suspend fun createParameters(collection: FeatureCollection): Result<RouteParameters>

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.

suspend fun createParameters(portalItem: PortalItem): Result<RouteParameters>

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
fun getRouteTaskInfo(): RouteTaskInfo

Gets route task info. Generates default parameters.

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.

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

Solves a route passing in a parameters object.

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.

Link copied to clipboard
Link copied to clipboard
val url: String

The URL of online service.