ArcGIS Developers

RouteTaskUtility QML Type

A utility that contains methods to work with route tasks. More...

Import Statement: import Esri.ArcGISRuntime 100.10
Since: Esri.ArcGISRuntime 100.3





Detailed Description

Use this singleton type to access helper methods that can be used in conjunction with a RouteTask.

Currently, this type contains a method to help import a route result from a portal item. Use the createRouteResult method with a portal representing a feature collection that contains directions, stops, route info, and barriers tables.

Note: You cannot declare or create a component of this type in QML code. Rather, an instance is automatically created and only that single instance is available for use in the application.

See also Cancelable, FeatureCollection, PortalItem, RouteTask, and RouteResult.

Property Documentation

createRouteResultResult : RouteResult

Results from createRouteResult, giving access to the output RouteResult (read-only).

Obtain this property after the createRouteResultStatusChanged signal emits, and the createRouteResultStatus property is complete.

createRouteResultStatus : Enums.TaskStatus

Returns the status of the createRouteResult asynchronous operation (read-only).

Check this status when the createRouteResultStatusChanged signal emits, to determine if the operation is complete, in progress, or has errored.

See also Enums.TaskStatus.

Signal Documentation


Emitted when the createRouteResultStatus property changes.

Note: The corresponding handler is onCreateRouteResultStatusChanged.

Method Documentation

bool cancelTask(string taskId)

Cancel the task with the ID taskId.

Returns false if the task cannot be cancelled or there is no task with the specified id taskId.

See also Cancelable.

string createRouteResult(PortalItem portalItem)

Imports a pre-generated route result from the supplied portal item.

This operation allows the user to download an existing route result from a portal and use it for routing purposes on the local device.

  • portalItem. The portal item with a feature collection that contains directions, stops, route info, and barriers tables.

The createRouteResultStatusChanged signal emits when the operation is complete. Check the createRouteResultStatus to make sure the operation completed successfully.

Returns a task ID that can be used to cancel the createRouteResult task.

Feedback on this topic?