Route Activity

Description

The Route activity finds routes between two or more locations and optionally, get driving directions using ArcGIS Server network analysis services.

Usage

You may need to find directions from one place to another. You could get the user's current location using the Get Current Position activity then use the Route activity to find directions from the user's current position to another point of your choice.

Offline Support

This activity does not work when the device is offline.

Inputs

Url

Required

Type: String

The URL to the ArcGIS network analysis service.

For example, http://server/arcgis/rest/services/<serviceName>/NAServer/<layerName>.

Stops

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of stops loaded as network locations during analysis.

Accumulate Attributes

Optional

Type: String[]

The list of network attribute names to be accumulated with the analysis. That is, which attributes should be returned as part of the response.

Attribute Parameter Values

Optional

Type: esri.AttributeParameterValue (3.x, 4.x)*

An object describing the parameter values. If present, an attribute name, parameter name, and value must be specified.

Barriers

Optional

Type:esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of point barriers loaded as network locations during analysis.

Directions Language

Optional

Type: String

The language used when computing directions.

Directions Length Units

Optional

Type: String

The length unit to use when computing directions.

The default is as defined in the specific routing network layer.

Known values: centimeters | decimal-degrees | decimeters | feet | inches | kilometers | meters | miles | millimeters | nautical-miles | points | yards.

Directions Output Type

Optional

Type: String

Defines the amount of direction information returned.

The default value is standard.

Known values: complete | complete-no-events | instructions-only | standard | summary-only.

Directions Style Name

Optional

Type: String

The style to be used when returning directions.

Directions Time Attribute

Optional

Type: String

The name of network attribute to use for the drive time when computing directions.

Do Not Locate On Restricted Elements

Optional

Type: Boolean

If true, avoids network elements restricted by barriers or restrictions specified in restrictionAttributes.

The default value is true.

Find Best Sequence

Optional

Type: Boolean

When the findBestSequence = true, the route solver attempts the optimal sequence to visit the stops.

Ignore Invalid Locations

Optional

Type: Boolean

When false, the solve operation will fail if at least one of the stops specified cannot be located or reached.

When true, as long as there are at least two valid stops that have been connected by a route, a valid route is returned.

Impedance Attribute

Optional

Type: String

The network attribute name to be used as the impedance attribute in the analysis.

Output Geometry Precision

Optional

Type: Number

The precision of the output geometry after generalization.

Output Geometry Precision Units

Optional

Type: String

The units of the output geometry precision.

Known Values: centimeters | decimal-degrees | decimeters | feet | inches | kilometers | meters | miles | millimeters | nautical-miles | points | yards.

Output Lines

Optional

Type: String

The type of output lines to be generated in the result.

The default value is true-shape.

Known Values: none | straight | true-shape | true-shape-with-measure.

Out Spatial Reference

Optional

Type: Number | String | esri.SpatialReference (3.x, 4.x)*

The spatial reference for the geometries returned with the analysis results.

Polygon Barriers

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of polygon barriers loaded as network locations during analysis.

Polyline Barriers

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of polyline barriers loaded as network locations during analysis.

Preserve First Stop

Optional

Type: Boolean

If true, keeps the first stop fixed in the sequence even when findBestSequence = true.

Only applicable if findBestSequence = true.

Preserve Last Stop

Optional

Type: Boolean

If true, keeps the last stop fixed in the sequence even when findBestSequence = true.

Only applicable if findBestSequence = true.

Restriction Attributes

Optional

Type: String[]

The list of network attribute names to be used as restrictions with the analysis.

Restrict UTurns

Optional

Type: String

Specifies how U-Turns should be handled.

The default is as defined in the specific routing network layer.

Known Values: allow-backtrack | at-dead-ends-only | no-backtrack | at-dead-ends-and-intersections.

Return Barriers

Optional

Type: Boolean

If true, barriers are returned with the RouteResult.

The default value is false.

Return Directions

Optional

Type: Boolean

If true, directions are returned in the directions property of each RouteResult.

The default value is false.

Return Polygon Barriers

Optional

Type: Boolean

If true, polygon barriers are returned in the RouteResult.

The default value is false.

Return Polyline Barriers

Optional

Type: Boolean

If true, polyline barriers are returned in the RouteResult.

The default value is false.

Return Routes

Optional

Type: Boolean

If true, routes are generated and returned in the route property of each RouteResult.

The default value is true.

Return Stops

Optional

Type: Boolean

If true, stops are returned in the stops property of each RouteResult.

The default value is false.

Return Z

Optional

Type: Boolean

If true, z values are returned in the RouteResult.

The default value is true.

Start Time

Optional

Type: Date

The time the route begins.

Start Time Is UTC

Optional

Type: Boolean

If true, the start time will be in UTC format.

Use Hierarchy

Optional

Type: Boolean

If true, the hierarchy attribute for the network should be used in analysis.

Use Time Windows

Optional

Type: [Boolean

A useful feature of the RouteTask is the ability to constrain stop visits to certain times of day, or "time windows".

* Geocortex Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of application. Web AppBuilder 2D apps and Geocortex HTML5 viewers use version 3.x of the JavaScript API. Web AppBuilder 3D apps use version 4.x.

Outputs

barriers

Type: esri.Point[] (3.x, 4.x)*

The point barriers.

messages

Type: esri.NAMessage[] (3.x, 4.x)*

The messages returned by the network analysis service.

polygonBarriers

Type: esri.Polygon[] (3.x, 4.x)*

The polygon barriers.

polylineBarriers

Type: esri.Polyline[] (3.x, 4.x)*

The polyline barriers.

routeResults

Type: esri.RouteResult[] (3.x, 4.x)*

The route results.

* Geocortex Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of application. Web AppBuilder 2D apps and Geocortex HTML5 viewers use version 3.x of the JavaScript API. Web AppBuilder 3D apps use version 4.x.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Version Information

Supported from: Geocortex Viewer for HTML5 2.9, Web AppBuilder for ArcGIS 2.4.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.10