Packagecom.afcomponents.umap.display.routemanager
Classpublic class CloudMadeService
InheritanceCloudMadeService Inheritance DefaultRouteService Inheritance flash.events.EventDispatcher
Implementsflash.events.IEventDispatcher, IRouteService



Public Properties
 PropertyDefined by
 InheritedrouteResults : RouteResults
Returns route results obtained by previous doRoute operation.
DefaultRouteService
Protected Properties
 PropertyDefined by
 Inherited_loader : URLLoader
DefaultRouteService
 Inherited_options : Object
Default route options.
DefaultRouteService
 Inherited_results : RouteResults
DefaultRouteService
Public Methods
 MethodDefined by
  
CloudMadeService(options:Object = null)
Creates new MapQuest Route service object.
CloudMadeService
 Inherited
dispose():void
Releases all the resources accuired by the service.
DefaultRouteService
  
doRoute(locations:Array, options:Object = null):Boolean
Request a route between 2 locations.
CloudMadeService
Protected Methods
 MethodDefined by
 Inherited
copyOptions(options:Object):void
Copies all properties from the specified options Object to the default options Object.
DefaultRouteService
  
geometryToLatLngArray(src:Array):Array
CloudMadeService
  
getHeading(heading:String):String
CloudMadeService
  
getTurnType(turnType:String):String
CloudMadeService
 Inherited
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.
CloudMadeService
 Inherited
sendRequest(request:*):Boolean
Processes request specified as a URI String or URLRequest object.
DefaultRouteService
Public Constants
 ConstantDefined by
  ROUTE_LANGUAGE_ENGLISH : String = "lang=en"
[static] Defines the value of the routeLanguage property.
CloudMadeService
  ROUTE_LANGUAGE_GERMAN : String = "lang=de"
[static] Defines the value of the routeLanguage property.
CloudMadeService
  ROUTE_TYPE_BICYCLE : String = "bicyle"
[static] Defines the value of the routeType property.
CloudMadeService
  ROUTE_TYPE_CAR : String = "car"
[static] Defines the value of the routeType property.
CloudMadeService
  ROUTE_TYPE_CAR_SHORTEST : String = "car/shortest"
[static] Defines the value of the routeType property.
CloudMadeService
  ROUTE_TYPE_FOOT : String = "foot"
[static] Defines the value of the routeType property.
CloudMadeService
  ROUTE_UNITS_KILOMETERS : String = "units=km"
[static] Defines the value of the routeUnits property.
CloudMadeService
  ROUTE_UNITS_MILES : String = "units=miles"
[static] Defines the value of the routeLanguage property.
CloudMadeService
Constructor detail
CloudMadeService()constructor
public function CloudMadeService(options:Object = null)

Creates new MapQuest Route service object. Specify default options in the constructor parameter.

In the following table you can see the list of route options, together with default values.

Parameter Values Default Description
routeType ROUTE_TYPE_/td> ROUTE_TYPE_CAR Type of route to calculate routeLanguage ROUTE_LANGUAGE_/td> ROUTE_LANGUAGE_ENGLISH Narrative language routeUnits ROUTE_UNITS_/td> ROUTE_UNITS_KILOMETERS Distance units url String http://routes.cloudmade.com/[apikey]/api/0.3/ URL of the cloud made routing server

Parameters
options:Object (default = null) — Defines default service options.
Method detail
doRoute()method
public override function doRoute(locations:Array, options:Object = null):Boolean

Request a route between 2 locations. Locations can be specified as GeoAddress objects or LatLng objects. Additional options should be sepcified in the second parameter.

Parameters
locations:Array — Array of 2 locations.
 
options:Object (default = null) — Additonal options.

Returns
Boolean — A value of true if a request has been accepted, and is being processed; false if it is not.

See also

geometryToLatLngArray()method 
protected function geometryToLatLngArray(src:Array):ArrayParameters
src:Array

Returns
Array
getHeading()method 
protected function getHeading(heading:String):StringParameters
heading:String

Returns
String
getTurnType()method 
protected function getTurnType(turnType:String):StringParameters
turnType:String

Returns
String
parseData()method 
protected override 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.
Constant detail
ROUTE_LANGUAGE_ENGLISHconstant
public static const ROUTE_LANGUAGE_ENGLISH:String = "lang=en"

Defines the value of the routeLanguage property. Use this value to get the narrative in English (default).

ROUTE_LANGUAGE_GERMANconstant 
public static const ROUTE_LANGUAGE_GERMAN:String = "lang=de"

Defines the value of the routeLanguage property. Use this value to get the narrative in German.

ROUTE_TYPE_BICYCLEconstant 
public static const ROUTE_TYPE_BICYCLE:String = "bicyle"

Defines the value of the routeType property. Use this value to get the bicycle route.

ROUTE_TYPE_CARconstant 
public static const ROUTE_TYPE_CAR:String = "car"

Defines the value of the routeType property. Use this value to get the car route.

ROUTE_TYPE_CAR_SHORTESTconstant 
public static const ROUTE_TYPE_CAR_SHORTEST:String = "car/shortest"

Defines the value of the routeType property. Use this value to get the shortest car route.

ROUTE_TYPE_FOOTconstant 
public static const ROUTE_TYPE_FOOT:String = "foot"

Defines the value of the routeType property. Use this value to get the foot route.

ROUTE_UNITS_KILOMETERSconstant 
public static const ROUTE_UNITS_KILOMETERS:String = "units=km"

Defines the value of the routeUnits property. Use this value to get the distance in kilometers (default).

ROUTE_UNITS_MILESconstant 
public static const ROUTE_UNITS_MILES:String = "units=miles"

Defines the value of the routeLanguage property. Use this value to get the distance in miles.