| Package | com.esri.ags.tasks |
| Class | public class RouteParameters |
Note: RouteParameters, and other routing related classes, were added in version 1.2 and requires ArcGIS Server 9.3.1 or above (with a "route" layer).
<esri:RouteParameters id="routeParams" stops="{stops}"/>
<esri:RouteParameters id="routeParams"
stops="{stopsFS}"
returnRoutes="false"
returnDirections="true"
directionsLengthUnits="esriMiles"
outSpatialReference="{myMap.spatialReference}"/>See also
| Property | Defined by | ||
|---|---|---|---|
| accumulateAttributes : Array
The list of network attribute names to be accumulated with the analysis, i.e., which attributes should be returned as part of the response.
| RouteParameters | ||
| barriers : Object
The set of barriers loaded as network locations during analysis.
| RouteParameters | ||
| directionsLanguage : String
The language to be used when computing directions.
| RouteParameters | ||
| directionsLengthUnits : String
The length units to use when computing directions.
| RouteParameters | ||
| directionsTimeAttribute : String
The name of network attribute to use for the drive time when computing directions.
| RouteParameters | ||
| doNotLocateOnRestrictedElements : Boolean = false
If true, avoid network elements restricted by barriers or due to restrictions specified in restrictionAttributes.
| RouteParameters | ||
| findBestSequence : Boolean
If true, the solver will optimize the order of the stops in the route (while taking into account preserveFirstStop and preserveLastStop if they were set to true).
| RouteParameters | ||
| ignoreInvalidLocations : Boolean
When false, the solve operation will fail if at least one of the stops specified cannot be located or reached.
| RouteParameters | ||
| impedanceAttribute : String
The network attribute name to be used as the impedance attribute in analysis.
| RouteParameters | ||
| outputGeometryPrecision : Number
The precision of the output geometry after generalization.
| RouteParameters | ||
| outputGeometryPrecisionUnits : String
The units of the output geometry precision.
| RouteParameters | ||
| outputLines : String
The type of output lines to be generated in the result.
| RouteParameters | ||
| outSpatialReference : SpatialReference
The well-known ID of the spatial reference for the geometries returned with the analysis results.
| RouteParameters | ||
| preserveFirstStop : Boolean
If true, the solver should keep the first stop fixed in the sequence (even when findBestSequence is true).
| RouteParameters | ||
| preserveLastStop : Boolean
If true, the solver should keep the last stop fixed in the sequence (even when findBestSequence is true).
| RouteParameters | ||
| restrictionAttributes : Array
The list of network attribute names to be used as restrictions with the analysis.
| RouteParameters | ||
| restrictUTurns : String
Specifies how U-Turns should be handled.
| RouteParameters | ||
| returnBarriers : Boolean = false
If true, barriers will be returned in the barriers property of RouteSolveResult.
| RouteParameters | ||
| returnDirections : Boolean = false
If true, directions will be generated and returned in the directions
property of each RouteResult of the RouteSolveResult.
| RouteParameters | ||
| returnRoutes : Boolean = true
If true, routes will be generated and returned in the route property of each RouteResult of the RouteSolveResult.
| RouteParameters | ||
| returnStops : Boolean = false
If true, stops will be returned in the stops property of RouteSolveResult.
| RouteParameters | ||
| startTime : Date
The time the route begins.
| RouteParameters | ||
| stops : Object
The set of stops loaded as network locations during analysis.
| RouteParameters | ||
| useHierarchy : Boolean
If true, the hierarchy attribute for the network should be used in analysis.
| RouteParameters | ||
| useTimeWindows : Boolean
If true, the solver should consider time windows.
| RouteParameters | ||
| accumulateAttributes | property |
public var accumulateAttributes:ArrayThe list of network attribute names to be accumulated with the analysis, i.e., which attributes should be returned as part of the response. The default is as defined in the specific routing network layer used in your RouteTask. You can specify any attributes names listed in the Service Directory under "Network Dataset -> Network Attributes" as "Usage Type: esriNAUTCost".
See also
| barriers | property |
public var barriers:ObjectThe set of barriers loaded as network locations during analysis. Can be either an instance of DataLayer or FeatureSet.
See also
| directionsLanguage | property |
public var directionsLanguage:StringThe language to be used when computing directions. The default is as defined in the specific routing network layer used in your RouteTask. By default, NAServer gets installed with en_US only - it is up to the server administrator to add additional languages.
| directionsLengthUnits | property |
public var directionsLengthUnits:StringThe length units to use when computing directions. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are "esriFeet", "esriKilometers", "esriMeters", "esriMiles", "esriNauticalMiles" and "esriYards".
| directionsTimeAttribute | property |
public var directionsTimeAttribute:StringThe name of network attribute to use for the drive time when computing directions. The default is as defined in the specific routing network layer used in your RouteTask.
| doNotLocateOnRestrictedElements | property |
public var doNotLocateOnRestrictedElements:Boolean = falseIf true, avoid network elements restricted by barriers or due to restrictions specified in restrictionAttributes.
The default value is false.
| findBestSequence | property |
findBestSequence:Boolean [read-write]If true, the solver will optimize the order of the stops in the route (while taking into account preserveFirstStop and preserveLastStop if they were set to true). The default is as defined in the specific routing network layer used in your RouteTask.
Implementation public function get findBestSequence():Boolean
public function set findBestSequence(value:Boolean):void
| ignoreInvalidLocations | property |
ignoreInvalidLocations:Boolean [read-write]When false, the solve operation will fail if at least one of the stops specified cannot be located or reached. If true, invalid locations are ignored and route(s) will be returned as long as there are at least two valid stops that have been connected by a route. If multiple routes are processed in a single request a valid result will be returned as long as least one route is built. The list of routes that cannot be solved is included in RouteSolveResult.messages property.
Implementation public function get ignoreInvalidLocations():Boolean
public function set ignoreInvalidLocations(value:Boolean):void
| impedanceAttribute | property |
public var impedanceAttribute:StringThe network attribute name to be used as the impedance attribute in analysis. The default is as defined in the specific routing network layer used in your RouteTask. You can specify any attributes names listed in the Service Directory under "Network Dataset -> Network Attributes" as "Usage Type: esriNAUTCost". You can also specify a value of "none" to indicate that no network attributes should be used for impedance. If you specify an empty string, it will use the default of the service.
For example, set impedanceAttribute="Time" for quickest route and impedanceAttribute="Length" for shortest drive. Assuming the service has those two esriNAUTCost attributes.
See also
| outputGeometryPrecision | property |
public var outputGeometryPrecision:NumberThe precision of the output geometry after generalization. If 0, no generalization of output geometry is performed. If present and positive, it represents the MaximumAllowableOffset parameter - generalization is performed according to IPolycurve.Generalize.
| outputGeometryPrecisionUnits | property |
public var outputGeometryPrecisionUnits:StringThe units of the output geometry precision.
The default value is esriUnknownUnits.
| outputLines | property |
public var outputLines:StringThe type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are "esriNAOutputLineNone" (no line at all), "esriNAOutputLineStraight" (a straight line from start to end) and "esriNAOutputLineTrueShape".
See also
| outSpatialReference | property |
public var outSpatialReference:SpatialReferenceThe well-known ID of the spatial reference for the geometries returned with the analysis results. If outSR is not specified, the geometries are returned in the spatial reference of the map.
| preserveFirstStop | property |
preserveFirstStop:Boolean [read-write]If true, the solver should keep the first stop fixed in the sequence (even when findBestSequence is true). Only applicable if findBestSequence is true. The default is as defined in the specific routing network layer used in your RouteTask.
Implementation public function get preserveFirstStop():Boolean
public function set preserveFirstStop(value:Boolean):void
| preserveLastStop | property |
preserveLastStop:Boolean [read-write]If true, the solver should keep the last stop fixed in the sequence (even when findBestSequence is true). Only applicable if findBestSequence is true. The default is as defined in the specific routing network layer used in your RouteTask.
Implementation public function get preserveLastStop():Boolean
public function set preserveLastStop(value:Boolean):void
| restrictionAttributes | property |
public var restrictionAttributes:ArrayThe list of network attribute names to be used as restrictions with the analysis. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are listed in the Service Directory under "Network Dataset -> Network Attributes". You can also specify a value of "none" to indicate that no network attributes should be used as restrictions. If you specify an empty array, it will default to the default of the service.
myRouteParams.restrictionAttributes = ["OneWay"];
myRouteParams.restrictionAttributes = ["none"];
| restrictUTurns | property |
public var restrictUTurns:StringSpecifies how U-Turns should be handled. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are "esriNFSBAllowBacktrack", "esriNFSBAtDeadEndsOnly" and "esriNFSBNoBacktrack".
See also
| returnBarriers | property |
public var returnBarriers:Boolean = falseIf true, barriers will be returned in the barriers property of RouteSolveResult.
The default value is false.
See also
| returnDirections | property |
public var returnDirections:Boolean = falseIf true, directions will be generated and returned in the directions property of each RouteResult of the RouteSolveResult.
The default value is false.
See also
| returnRoutes | property |
public var returnRoutes:Boolean = trueIf true, routes will be generated and returned in the route property of each RouteResult of the RouteSolveResult.
The default value is true.
See also
| returnStops | property |
public var returnStops:Boolean = falseIf true, stops will be returned in the stops property of RouteSolveResult.
The default value is false.
See also
| startTime | property |
public var startTime:DateThe time the route begins. If not specified, the solver will not start the route at a particular time. The time should be specified as a numeric value representing the milliseconds since midnight January 1, 1970. It can be a negative number.You can also specify a value of none to indicate that a start time should not be used.
| stops | property |
public var stops:ObjectThe set of stops loaded as network locations during analysis. Can be either an instance of DataLayer or FeatureSet.
To do batch routing (solving multiple routes at once), add route names to each of your stops.
See also
| useHierarchy | property |
useHierarchy:Boolean [read-write]If true, the hierarchy attribute for the network should be used in analysis. The default is as defined in the specific routing network layer used in your RouteTask.
Implementation public function get useHierarchy():Boolean
public function set useHierarchy(value:Boolean):void
| useTimeWindows | property |
useTimeWindows:Boolean [read-write]If true, the solver should consider time windows. The default is as defined in the specific routing network layer used in your RouteTask.
Implementation public function get useTimeWindows():Boolean
public function set useTimeWindows(value:Boolean):void