| Package | com.esri.ags.tasks |
| Class | public class RouteTask |
| Inheritance | RouteTask BaseTask flash.events.EventDispatcher |
The "cost" (of the least-cost path) is calculated based on an impedance attribute which you define in a network dataset. Impedance can be time or distance, or even a more abstract variable such as "scenic value".
Note: RouteTask, and other routing related classes, were added in version 1.2 and requires ArcGIS Server 9.3.1 or above (with a "route" layer).
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | concurrency : String = "multiple"
Value that indicates how to handle multiple calls to the same task.
| BaseTask | |
![]() | disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from
being loaded from the browser's cache.
| BaseTask | |
![]() | proxyURL : String
The URL to proxy the request through.
| BaseTask | |
![]() | requestTimeout : Number = -1
The request timeout in seconds.
| BaseTask | |
![]() | showBusyCursor : Boolean = false
If true, a busy cursor is displayed while a service is executing.
| BaseTask | |
| solveLastResult : RouteSolveResult
The last route result of the solve function.
| RouteTask | ||
![]() | token : String
Token for accessing a secure task.
| BaseTask | |
![]() | url : String
URL of the task.
| BaseTask | |
| Method | Defined by | ||
|---|---|---|---|
|
RouteTask(url:String = null)
Creates a new RouteTask instance.
| RouteTask | ||
|
solve(routeParameters:RouteParameters, responder:IResponder = null):AsyncToken
Solve the route.
| RouteTask | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when a RouteTask fails. | RouteTask | |||
| Dispatched on success. | RouteTask | |||
| solveLastResult | property |
public var solveLastResult:RouteSolveResultThe last route result of the solve function.
This property can be used as the source for data binding.
| RouteTask | () | constructor |
public function RouteTask(url:String = null)Creates a new RouteTask instance.
Parametersurl:String (default = null) — [optional] URL to the ArcGIS Server REST resource that represents a route service.
|
| solve | () | method |
public function solve(routeParameters:RouteParameters, responder:IResponder = null):AsyncTokenSolve the route.
ParametersrouteParameters:RouteParameters — The criteria used to solve the route.
|
|
responder:IResponder (default = null) — The responder to call on result or fault.
|
AsyncToken |
| fault | event |
| solveComplete | event |
com.esri.ags.events.RouteEvent
com.esri.ags.events.RouteEvent.SOLVE_COMPLETE
Dispatched on success.
Defines the value of the type property of an solveComplete event object.