| Package | com.afcomponents.umap.display.routemanager |
| Class | public class MapQuestService |
| Inheritance | MapQuestService DefaultRouteService flash.events.EventDispatcher |
| Implements | flash.events.IEventDispatcher, IRouteService |
| Method | Defined by | ||
|---|---|---|---|
|
MapQuestService(options:Object = null)
Creates new MapQuest Route service object.
| MapQuestService | ||
![]() |
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.
| MapQuestService | ||
| Method | Defined 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.
| MapQuestService | ||
![]() |
sendRequest(request:*):Boolean
Processes request specified as a URI
String or URLRequest object. | DefaultRouteService | |
| Constant | Defined by | ||
|---|---|---|---|
| LANGUAGE_BRITISH_ENGLISH : String = "British English" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_DANISH : String = "Danish" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_DUTCH : String = "Dutch" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_ENGLISH : String = "English" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_FRENCH : String = "French" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_GERMAN : String = "German" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_IBERIAN_PORTUGUESE : String = "Iberian Portuguese" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_IBERIAN_SPANISH : String = "Iberian Spanish" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_ITALIAN : String = "Italian" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_NORWEGIAN : String = "Norwegian" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_SPANISH : String = "Spanish" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| LANGUAGE_SWEDISH : String = "Swedish" [static]
Defines the value of the
langauge property. | MapQuestService | ||
| NARRATIVE_DISTANCE_UNIT_KILOMETERS : int = 1 [static]
Defines the value of the
narrativeDistanceUnitType property. | MapQuestService | ||
| NARRATIVE_DISTANCE_UNIT_MILES : int = 0 [static]
Defines the value of the
narrativeDistanceUnitType property. | MapQuestService | ||
| NARRATIVE_TYPE_DEFAULT : int = 0 [static]
Defines the value of the
narrativeType property. | MapQuestService | ||
| NARRATIVE_TYPE_HTML : int = 1 [static]
Defines the value of the
narrativeType property. | MapQuestService | ||
| NARRATIVE_TYPE_NONE : int = -1 [static]
Defines the value of the
narrativeType property. | MapQuestService | ||
| RESULT_INVALID_LOCATION : int = 1 [static]
Defines the value of the
resultCode property of the RouteEvent object. | MapQuestService | ||
| RESULT_NO_DATASET_FOUND : int = 3 [static]
Defines the value of the
resultCode property of the RouteEvent object. | MapQuestService | ||
| RESULT_NOT_SPECIFIED : int = -1 [static]
Defines the value of the
resultCode property of the RouteEvent object. | MapQuestService | ||
| RESULT_ROUTE_FAILURE : int = 2 [static]
Defines the value of the
resultCode property of the RouteEvent object. | MapQuestService | ||
| RESULT_SUCCESS : uint = 0 [static]
Defines the value of the
resultCode property of the RouteEvent object. | MapQuestService | ||
| ROUTE_TYPE_FASTEST : int = 0 [static]
Defines the value of the
routeType property. | MapQuestService | ||
| ROUTE_TYPE_OPTIMIZED : int = 3 [static]
Defines the value of the
routeType property. | MapQuestService | ||
| ROUTE_TYPE_PEDESTRIAN : int = 2 [static]
Defines the value of the
routeType property. | MapQuestService | ||
| ROUTE_TYPE_SELECT_DATASET_ONLY : int = 4 [static]
Defines the value of the
routeType property. | MapQuestService | ||
| ROUTE_TYPE_SHORTEST : int = 1 [static]
Defines the value of the
routeType property. | MapQuestService | ||
| MapQuestService | () | constructor |
public function MapQuestService(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_SHORTEST | Type of route to calculate |
| narrativeType | NARRATIVE_TYPE_/td> | NARRATIVE_TYPE_HTML | Narrative type, that will be generated for each maneuver. |
| narrativeDistanceUnitType | NARRATIVE_DISTANCE_UNIT_/td> | NARRATIVE_IDSTANCE_UNIT_MILES | Distance uints displayed in route narrative. |
| maxShape | 0..int | 50 | The maximum number of shape points to return for each maneuver. If zero, no shape data is returned. |
| language | LANGUAGE_/td> | LANGUAGE_ENGLISH | Language to use in the narrative. |
| rawRouteOptions | XML <RouteOptions><option1/><option2></RouteOptions> | null | Additional options in XML format. |
| url | String | http://route.dev.mapquest.com/mq/mqserver.dll?e=5& | URL of the map quest routing server |
| requestMethod | URLRequestMethod.GET, URLRequestMethod.POST | URLRequestMethod.POST | Request method to use for the doRoute() opration. |
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 or more locations.
Locations can be specified as GeoAddress objects, LatLng objects or
GeoAddress in MapQuest XML format.
Additional options should be sepcified in the second parameter.
locations:Array — Array of 2 or more 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
| 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.
|
| LANGUAGE_BRITISH_ENGLISH | constant |
public static const LANGUAGE_BRITISH_ENGLISH:String = "British English"
Defines the value of the langauge property.
Use this value to get narrative in British English.
| LANGUAGE_DANISH | constant |
public static const LANGUAGE_DANISH:String = "Danish"
Defines the value of the langauge property.
Use this value to get narrative in Danish.
| LANGUAGE_DUTCH | constant |
public static const LANGUAGE_DUTCH:String = "Dutch"
Defines the value of the langauge property.
Use this value to get narrative in Dutch.
| LANGUAGE_ENGLISH | constant |
public static const LANGUAGE_ENGLISH:String = "English"
Defines the value of the langauge property.
Use this value to get narrative in English.
| LANGUAGE_FRENCH | constant |
public static const LANGUAGE_FRENCH:String = "French"
Defines the value of the langauge property.
Use this value to get narrative in French.
| LANGUAGE_GERMAN | constant |
public static const LANGUAGE_GERMAN:String = "German"
Defines the value of the langauge property.
Use this value to get narrative in German.
| LANGUAGE_IBERIAN_PORTUGUESE | constant |
public static const LANGUAGE_IBERIAN_PORTUGUESE:String = "Iberian Portuguese"
Defines the value of the langauge property.
Use this value to get narrative in Iberian Portuguese.
| LANGUAGE_IBERIAN_SPANISH | constant |
public static const LANGUAGE_IBERIAN_SPANISH:String = "Iberian Spanish"
Defines the value of the langauge property.
Use this value to get narrative in Iberian Spanish.
| LANGUAGE_ITALIAN | constant |
public static const LANGUAGE_ITALIAN:String = "Italian"
Defines the value of the langauge property.
Use this value to get narrative in Italian.
| LANGUAGE_NORWEGIAN | constant |
public static const LANGUAGE_NORWEGIAN:String = "Norwegian"
Defines the value of the langauge property.
Use this value to get narrative in Norwegian.
| LANGUAGE_SPANISH | constant |
public static const LANGUAGE_SPANISH:String = "Spanish"
Defines the value of the langauge property.
Use this value to get narrative in Spanish.
| LANGUAGE_SWEDISH | constant |
public static const LANGUAGE_SWEDISH:String = "Swedish"
Defines the value of the langauge property.
Use this value to get narrative in Swedish.
| NARRATIVE_DISTANCE_UNIT_KILOMETERS | constant |
public static const NARRATIVE_DISTANCE_UNIT_KILOMETERS:int = 1
Defines the value of the narrativeDistanceUnitType property.
Use this value to get distance in kilometers.
| NARRATIVE_DISTANCE_UNIT_MILES | constant |
public static const NARRATIVE_DISTANCE_UNIT_MILES:int = 0
Defines the value of the narrativeDistanceUnitType property.
Use this value to get distance in miles.
| NARRATIVE_TYPE_DEFAULT | constant |
public static const NARRATIVE_TYPE_DEFAULT:int = 0
Defines the value of the narrativeType property.
Use this value to get standard text narrative.
| NARRATIVE_TYPE_HTML | constant |
public static const NARRATIVE_TYPE_HTML:int = 1
Defines the value of the narrativeType property.
Use this value to get text narrative with some HTML tags: e.g. bold road names.
| NARRATIVE_TYPE_NONE | constant |
public static const NARRATIVE_TYPE_NONE:int = -1
Defines the value of the narrativeType property.
Use this value to cancel narrative generation.
| RESULT_INVALID_LOCATION | constant |
public static const RESULT_INVALID_LOCATION:int = 1
Defines the value of the resultCode property of the RouteEvent object.
| RESULT_NO_DATASET_FOUND | constant |
public static const RESULT_NO_DATASET_FOUND:int = 3
Defines the value of the resultCode property of the RouteEvent object.
| RESULT_NOT_SPECIFIED | constant |
public static const RESULT_NOT_SPECIFIED:int = -1
Defines the value of the resultCode property of the RouteEvent object.
| RESULT_ROUTE_FAILURE | constant |
public static const RESULT_ROUTE_FAILURE:int = 2
Defines the value of the resultCode property of the RouteEvent object.
| RESULT_SUCCESS | constant |
public static const RESULT_SUCCESS:uint = 0
Defines the value of the resultCode property of the RouteEvent object.
| ROUTE_TYPE_FASTEST | constant |
public static const ROUTE_TYPE_FASTEST:int = 0
Defines the value of the routeType property.
Use this value to get the quickest drive time route.
| ROUTE_TYPE_OPTIMIZED | constant |
public static const ROUTE_TYPE_OPTIMIZED:int = 3
Defines the value of the routeType property.
Use this value to get the route with the shortest drive time that includes all intermediate locations.
The intermediate locations are reordered to show the optimal order to visit each location.
| ROUTE_TYPE_PEDESTRIAN | constant |
public static const ROUTE_TYPE_PEDESTRIAN:int = 2
Defines the value of the routeType property.
Use this value to get the walking route (avoids limited access roads, ignores turn restrictions).
| ROUTE_TYPE_SELECT_DATASET_ONLY | constant |
public static const ROUTE_TYPE_SELECT_DATASET_ONLY:int = 4
Defines the value of the routeType property.
Does not compute a route, but performs route data selection.
Provides a method of querying which data coverage will be used.
| ROUTE_TYPE_SHORTEST | constant |
public static const ROUTE_TYPE_SHORTEST:int = 1
Defines the value of the routeType property.
Us this value to get the shortest driving distance route.