This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/tasks/ServiceAreaTask.html.
Packagecom.esri.ags.tasks
Classpublic class ServiceAreaTask
InheritanceServiceAreaTask Inheritance BaseTask Inheritance flash.events.EventDispatcher

Since : ArcGIS API for Flex 2.0

Helps you find service areas around any location on a network. A network service area is a region that encompasses all accessible streets (that is, streets that are within a specified impedance). For instance, the 5-minute service area for a point includes all the streets that can be reached within five minutes from that point.

Note: ServiceAreaTask, and other service area related classes, requires ArcGIS Server 10.0 or above and a "service area" layer. A "service area" layer is a layer of type "esriNAServerServiceAreaLayer".

Service Area in Action

See also

com.esri.ags.tasks.supportClasses.ServiceAreaParameters
com.esri.ags.tasks.supportClasses.ServiceAreaSolveResult
com.esri.ags.events.ServiceAreaEvent
Service Area [ArcGIS desktop help]
Live sample - Basic Service Area sample
Live sample - Multiple Service Areas


Public Properties
 PropertyDefined By
 InheritedautoNormalize : Boolean
If true, normalizes the geometries across the central meridian.
BaseTask
 Inheritedconcurrency : String
Value that indicates how to handle multiple calls to the same task.
BaseTask
 InheriteddisableClientCaching : 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
 Inheritedmethod : String
URL request method to use.
BaseTask
 InheritedproxyURL : String
The URL to proxy the request through.
BaseTask
 InheritedrequestTimeout : int
The request timeout in seconds.
BaseTask
 InheritedshowBusyCursor : Boolean
If true, a busy cursor is displayed while a service is executing.
BaseTask
  solveLastResult : ServiceAreaSolveResult
The result returned from last call to the solve function.
ServiceAreaTask
 Inheritedtoken : String
Token for accessing a secure task.
BaseTask
 Inheritedurl : String
URL of the task.
BaseTask
Public Methods
 MethodDefined By
  
ServiceAreaTask(url:String = null)
Creates a new ServiceAreaTask instance.
ServiceAreaTask
  
solve(serviceAreaParameters:ServiceAreaParameters, responder:IResponder = null):AsyncToken
Solve the closest facility.
ServiceAreaTask
Protected Methods
 MethodDefined By
 Inherited
sendURLVariables(urlSuffix:String, urlVariables:URLVariables, responder:IResponder, operation:Function):AsyncToken
Sends an HTTP request.
BaseTask
Events
 Event Summary Defined By
  Dispatched when a RouteTask fails.ServiceAreaTask
  Dispatched on success.ServiceAreaTask
Property Detail
solveLastResultproperty
solveLastResult:ServiceAreaSolveResult

The result returned from last call to the solve function.

This property can be used as the source for data binding.


Implementation
    public function get solveLastResult():ServiceAreaSolveResult
    public function set solveLastResult(value:ServiceAreaSolveResult):void
Constructor Detail
ServiceAreaTask()Constructor
public function ServiceAreaTask(url:String = null)

Creates a new ServiceAreaTask instance.

Parameters
url:String (default = null) — [optional] URL to the ArcGIS Server REST resource that represents a service area service.
Method Detail
solve()method
public function solve(serviceAreaParameters:ServiceAreaParameters, responder:IResponder = null):AsyncToken

Solve the closest facility.

Parameters

serviceAreaParameters:ServiceAreaParameters — The criteria used to solve the closest facility.
 
responder:IResponder (default = null) — The responder to call on result or fault.

Returns
AsyncToken
Event Detail
fault Event
Event Object Type: mx.rpc.events.FaultEvent
FaultEvent.type property = mx.rpc.events.FaultEvent.FAULT

Dispatched when a RouteTask fails.

solveComplete Event  
Event Object Type: com.esri.ags.events.ServiceAreaEvent
ServiceAreaEvent.type property = com.esri.ags.events.ServiceAreaEvent.SOLVE_COMPLETE

Dispatched on success.

Defines the value of the type property of an solveComplete event object.