| Package | com.afcomponents.umap.display.routemanager |
| Class | public class CloudMadeService |
| Inheritance | CloudMadeService DefaultRouteService flash.events.EventDispatcher |
| Implements | flash.events.IEventDispatcher, IRouteService |
| Method | Defined by | ||
|---|---|---|---|
|
CloudMadeService(options:Object = null)
Creates new MapQuest Route service object.
| CloudMadeService | ||
![]() |
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 | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
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 | ||
![]() |
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 | ||
![]() |
sendRequest(request:*):Boolean
Processes request specified as a URI
String or URLRequest object. | DefaultRouteService | |
| Constant | Defined 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 | ||
| 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 |
options:Object (default = null) — Defines default service options.
|
| 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.
locations:Array — Array of 2 locations.
|
|
options:Object (default = null) — Additonal options.
|
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 |
Array |
| getHeading | () | method |
protected function getHeading(heading:String):StringParameters
heading:String |
String |
| getTurnType | () | method |
protected function getTurnType(turnType:String):StringParameters
turnType:String |
String |
| parseData | () | method |
protected override function parseData(data:String):voidParse 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.
Parametersdata:String — String which contains the data.
|
| ROUTE_LANGUAGE_ENGLISH | constant |
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_GERMAN | constant |
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_BICYCLE | constant |
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_CAR | constant |
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_SHORTEST | constant |
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_FOOT | constant |
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_KILOMETERS | constant |
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_MILES | constant |
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.