Packagecom.afcomponents.umap.display.routemanager
Classpublic class DefaultRouteService
InheritanceDefaultRouteService Inheritance flash.events.EventDispatcher
Implementsflash.events.IEventDispatcher, IRouteService
SubclassesCloudMadeService, MapQuestService



Public Properties
 PropertyDefined by
  routeResults : RouteResults
[read-only] Returns route results obtained by previous doRoute operation.
DefaultRouteService
Protected Properties
 PropertyDefined by
  _loader : URLLoader
DefaultRouteService
  _options : Object
Default route options.
DefaultRouteService
  _results : RouteResults
DefaultRouteService
Public Methods
 MethodDefined by
  
DefaultRouteService
  
dispose():void
Releases all the resources accuired by the service.
DefaultRouteService
  
doRoute(locations:Array, options:Object = null):Boolean
Request a route between 2 or more locations.
DefaultRouteService
Protected Methods
 MethodDefined by
  
copyOptions(options:Object):void
Copies all properties from the specified options Object to the default options Object.
DefaultRouteService
  
mergeOptions(options:Object):Object
Adds properties from the default options Object to the target options Object, only if they are are not specified in the target options Object.
DefaultRouteService
  
parseData(data:String):void
Parse the request data that was loaded by the service.
DefaultRouteService
  
sendRequest(request:*):Boolean
Processes request specified as a URI String or URLRequest object.
DefaultRouteService
Property detail
_loaderproperty
protected var _loader:URLLoader
_optionsproperty 
protected var _options:Object

Default route options.

_resultsproperty 
protected var _results:RouteResults
routeResultsproperty 
routeResults:RouteResults  [read-only]

Returns route results obtained by previous doRoute operation.

Implementation
    public function get routeResults():RouteResults
Constructor detail
DefaultRouteService()constructor
public function DefaultRouteService()
Method detail
copyOptions()method
protected function copyOptions(options:Object):void

Copies all properties from the specified options Object to the default options Object.

Parameters
options:Object
dispose()method 
public function dispose():void

Releases all the resources accuired by the service.

doRoute()method 
public function doRoute(locations:Array, options:Object = null):Boolean

Request a route between 2 or more locations. Locations can be specified as Objects which can be processed by a concrete service. Additional options should be sepcified in the second parameter in a common to service format.

Parameters
locations:Array — Array of 2 or more locations.
 
options:Object (default = null) — Additonal options in a known to service format.

Returns
Boolean — A value of true if a request has been accepted, and is being processed; false if it is not.
mergeOptions()method 
protected function mergeOptions(options:Object):Object

Adds properties from the default options Object to the target options Object, only if they are are not specified in the target options Object.

Parameters
options:Object

Returns
Object — Merged options object.
parseData()method 
protected function parseData(data:String):void

Parse the request data that was loaded by the service. As a result of this operation service should create a Route object, and send it in a RouteEvent.READY.

Parameters
data:String — String which contains the data.
sendRequest()method 
protected function sendRequest(request:*):Boolean

Processes request specified as a URI String or URLRequest object.

Parameters
request:* — URI String or URLRequest object.

Returns
Boolean — A value of true if request was accepted and starts loadign; false if it was not.