AGSRouteTask Class Reference


Description

Instances of this class represent tasks than can find the best route to get from one location to another or to visit several locations.

The best route can be the quickest, shortest, or most scenic route, depending on the impedance chosen. If the impedance is time, then the best route is the quickest route. Hence, the best route can be defined as the route that has the lowest impedance.

A route task needs a URL to a REST resource that represents a Route layer in a Network Analyst service. For example, http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route

See also:
Conceptual Doc: Using a Route Task
Sample: Routing
Since:
1.8
Inheritance diagram for AGSRouteTask:
AGSTask <AGSSecuredResource>

List of all members.

Public Member Functions

(id) - initWithURL:
(id) - initWithURL:credential:
(NSOperation *) - retrieveDefaultRouteTaskParameters
(NSOperation *) - solveWithParameters:

Static Public Member Functions

(id) + routeTaskWithURL:
(id) + routeTaskWithURL:credential:

Properties

AGSCredentialcredential
id< AGSRouteTaskDelegatedelegate
NSURL * URL

Member Function Documentation

- (id) initWithURL: (NSURL *)  url  

Initialize the task.

Parameters:
url URL to a task resource in the ArcGIS Server REST Services Directory.
Returns:
A new task object.
Since:
1.0
- (id) initWithURL: (NSURL *)  url
credential: (AGSCredential *)  cred 

Initialize the task with a URL and credential to a secured resource.

Parameters:
url URL to a task resource in the ArcGIS Server REST Services Directory.
cred AGSCredential used to access secure resource.
Returns:
A new task object.
Since:
1.0
- (NSOperation*) retrieveDefaultRouteTaskParameters  

Retrieves the default route parameters.

Returns:
NSOperation for the request.
Since:
1.8
+ (id) routeTaskWithURL: (NSURL *)  url  

Return an initialized, auto released, route task

Parameters:
url URL to a REST resource that represents a Route layer in a Network Analyst service
Since:
1.8
+ (id) routeTaskWithURL: (NSURL *)  url
credential: (AGSCredential *)  cred 

Return an initialized, auto released, route task

Parameters:
url URL to a REST resource that represents a Route layer in a Network Analyst service
cred Credentials need to access the secured service
Since:
1.8
- (NSOperation*) solveWithParameters: (AGSRouteTaskParameters *)  routeParams  

Solves a route with the given input parameters. It relies on the Solve Route operation of the REST resource.

Parameters:
routeParams The input parameters for the solve operation.
Returns:
NSOperation for the current solve task.
Since:
1.8

Property Documentation

- (AGSCredential*) credential [read, write, copy, inherited]

The credential to be used to access secured resources.

Since:
1.0

Reimplemented from <AGSSecuredResource>.

- (id<AGSRouteTaskDelegate>) delegate [read, write, assign]

Delegate to be notified when the solve operation has completed or returned an error.

Since:
1.8
- (NSURL*) URL [read, copy, inherited]

URL to a task resource in the ArcGIS Server REST Services Directory.

Since:
1.0