Packagecom.mapquest
Classpublic class Exec
InheritanceExec Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined by
  EVENT_DO_TRANSACTION_ERROR : String = "doTransactionError"
[static] If a doTransaction call fails the ExecErrorEvent will be dispatched with this as the event type and a requestType that corresponds to the transaction type that failed.
Exec
  GET_SESSION_RESPONSE_MAP_STATE : String = "mapState"
[static]
Exec
  GET_SESSION_RESPONSE_SESSION : String = "mqSession"
[static] Constants for getSession Response.
Exec
  TRANS_TYPE_BATCH_GEOCODE : String = "BatchGeocode"
[static]
Exec
  TRANS_TYPE_CREATE_SESSION : String = "CreateSession"
[static]
Exec
  TRANS_TYPE_DOROUTE : String = "DoRoute"
[static]
Exec
  TRANS_TYPE_DOROUTE_MATRIX : String = "DoRouteMatrix"
[static]
Exec
  TRANS_TYPE_GEOCODE : String = "Geocode"
[static] Transaction Types are also used as the Event type for the ExecResultEvent when doTransaction call is successful.
Exec
  TRANS_TYPE_GET_RECORD_INFO : String = "GetRecordInfo"
[static]
Exec
  TRANS_TYPE_GET_ROUTE_BOUNDING_BOX_FROM_SESSION : String = "GetRouteBoundingBoxFromSession"
[static]
Exec
  TRANS_TYPE_GET_SERVER_INFO : String = "GetServerInfo"
[static]
Exec
  TRANS_TYPE_GET_SESSION : String = "GetSession"
[static]
Exec
  TRANS_TYPE_REVERSE_GEOCODE : String = "ReverseGeocode"
[static]
Exec
  TRANS_TYPE_SEARCH : String = "Search"
[static]
Exec
Public Methods
 MethodDefined by
  
Exec(serverNameOrCopyObj:Object = null, serverPath:String = null, serverPort:int = -1)
Constructs a new exec object.
Exec
  
batchGeocode(addresses:LocationCollection, theOptions:MQObject = null):void
Method to geocode a collection(Batch) of addresses or intersections.
Exec
  
createSessionEx(mqsSession:MQSession):void
Generates a request to the MapQuest server (as specified by the server name, path, and port number) to create a user Session.
Exec
  
doRoute(mqlcLocations:LocationCollection, mqroOptions:RouteOptions, strSessionUID:String):void
Calculates a route using a collection of locations as origin and destination.
Exec
  
doRouteMatrix(mqlcLocations:LocationCollection, bAllToAll:Boolean, mqroOptions:RouteOptions):void
Calculates a route matrix.
Exec
  
geocode(address:Location, theOptions:MQObject = null):void
Method to geocode an address or an intersection.
Exec
  
Exec
  
getClientId():String
Returns the client id for authentication for this request.
Exec
  
getPassword():String
Returns the password for authentication for this request.
Exec
  
getRecordInfo(mqscFieldNames:StringCollection, mqdlqQuery:DBLayerQuery, mqscRecIds:StringCollection):void
Generates a request to the MapQuest server (as specified by the server name, path, and port number) to perform a DB Search based on either the recordIds received or the extraCriteria info of the dblayerquery.
Exec
  
getRouteBoundingBoxFromSessionResponse(sessionId:String, previousRequestObjs:Array = null):void
Sets the rectLL appropriately for tilemaps routing
Exec
  
getServerInfo(lType:int = 0):void
Returns the string which specifies the coverage information requested directly via an http request.
Exec
  
getServerName(transType:String = null):String
Returns the name of the server which will be used to satisfy this request.
Exec
  
getServerPath(transType:String = null):String
Returns the path to the server which will be used to satisfy this request.
Exec
  
getServerPort(transType:String = null):int
Returns the port number of the server which will be used to satisfy this request.
Exec
  
getSession(strSessionID:String, responseType:String = "mqSession"):void
getSession - Get the session object from the server.
Exec
  
Gets data to be passed to the server to be logged with any subsequent requests in the transaction log.
Exec
  
reverseGeocode(mqllLatLng:LatLng, strMapCovName:String = "", strGeocodeCovName:String = ""):void
Finds the address at a given latitude/longitude position.
Exec
  
search(mqscCriteria:SearchCriteria, strCoverageName:String, mqdlqcDbLayers:DBLayerQueryCollection, mqfcFeatures:FeatureCollection = null, mqdcDisplayTypes:DTCollection = null):void
Generates a request to the MapQuest server (as specified by the server name, path, and port number) to perform a search and return the results in a FeatureCollection object.
Exec
  
setClientConfigURL(configURL:String):void
Set the location of the client configuration file.
Exec
  
setClientId(clientId:String):void
Sets the client id for authentication for this request.
Exec
  
setPassword(password:String):void
Sets the password for authentication for this request.
Exec
  
setServerName(serverName:String):void
Sets the name of the server which is to be used to satisfy this request.
Exec
  
setServerPath(serverPath:String):void
Sets the path to the server which is to be used to satisfy this request.
Exec
  
setServerPort(serverPort:int):void
Sets the port number to the server which is to be used to satisfy this request.
Exec
  
setTransactionInfo(xInfo:String):void
Sets data to be passed to the server to be logged with any subsequent requests in the transaction log.
Exec
Property detail
EVENT_DO_TRANSACTION_ERRORproperty
public static var EVENT_DO_TRANSACTION_ERROR:String = "doTransactionError"

If a doTransaction call fails the ExecErrorEvent will be dispatched with this as the event type and a requestType that corresponds to the transaction type that failed.

GET_SESSION_RESPONSE_MAP_STATEproperty 
public static var GET_SESSION_RESPONSE_MAP_STATE:String = "mapState"
GET_SESSION_RESPONSE_SESSIONproperty 
public static var GET_SESSION_RESPONSE_SESSION:String = "mqSession"

Constants for getSession Response.

TRANS_TYPE_BATCH_GEOCODEproperty 
public static var TRANS_TYPE_BATCH_GEOCODE:String = "BatchGeocode"
TRANS_TYPE_CREATE_SESSIONproperty 
public static var TRANS_TYPE_CREATE_SESSION:String = "CreateSession"
TRANS_TYPE_DOROUTEproperty 
public static var TRANS_TYPE_DOROUTE:String = "DoRoute"
TRANS_TYPE_DOROUTE_MATRIXproperty 
public static var TRANS_TYPE_DOROUTE_MATRIX:String = "DoRouteMatrix"
TRANS_TYPE_GEOCODEproperty 
public static var TRANS_TYPE_GEOCODE:String = "Geocode"

Transaction Types are also used as the Event type for the ExecResultEvent when doTransaction call is successful.

TRANS_TYPE_GET_RECORD_INFOproperty 
public static var TRANS_TYPE_GET_RECORD_INFO:String = "GetRecordInfo"
TRANS_TYPE_GET_ROUTE_BOUNDING_BOX_FROM_SESSIONproperty 
public static var TRANS_TYPE_GET_ROUTE_BOUNDING_BOX_FROM_SESSION:String = "GetRouteBoundingBoxFromSession"
TRANS_TYPE_GET_SERVER_INFOproperty 
public static var TRANS_TYPE_GET_SERVER_INFO:String = "GetServerInfo"
TRANS_TYPE_GET_SESSIONproperty 
public static var TRANS_TYPE_GET_SESSION:String = "GetSession"
TRANS_TYPE_REVERSE_GEOCODEproperty 
public static var TRANS_TYPE_REVERSE_GEOCODE:String = "ReverseGeocode"
TRANS_TYPE_SEARCHproperty 
public static var TRANS_TYPE_SEARCH:String = "Search"
Constructor detail
Exec()constructor
public function Exec(serverNameOrCopyObj:Object = null, serverPath:String = null, serverPort:int = -1)

Constructs a new exec object.

Parameters
serverNameOrCopyObj:Object (default = null) — or copy object. If the parameter contains an Exec Object the server name serverPath, server port as well as the clientId and password are taken from the exec object. If the parameter contains a string it is used as the server name.
 
serverPath:String (default = null) — - Location of the server. Optional
 
serverPort:int (default = -1)
Method detail
batchGeocode()method
public function batchGeocode(addresses:LocationCollection, theOptions:MQObject = null):void

Method to geocode a collection(Batch) of addresses or intersections. Geocode options supply the QualityType and MatchType.

Parameters
addresses:LocationCollection — location collection object containing the addresses to be geocoded (Please Note: This object will not be updated, it is simply used for the request.)
 
theOptions:MQObject (default = null) — theOptions The AutoGeocodeCovSwitch or GeocodeOptionsCollection to select a set of options stored on the server. (Please Note: This object will not be updated, it is simply used for the request.)
createSessionEx()method 
public function createSessionEx(mqsSession:MQSession):void

Generates a request to the MapQuest server (as specified by the server name, path, and port number) to create a user Session. The Session is assigned a unique identifier which is used to access and update the Session information.

Parameters
mqsSession:MQSession — {MQSession} mqsSession Object containing objects for the session. (Please Note: This object will not be updated, it is simply used for the request.)
doRoute()method 
public function doRoute(mqlcLocations:LocationCollection, mqroOptions:RouteOptions, strSessionUID:String):void

Calculates a route using a collection of locations as origin and destination. These locations can be Address, GeoAddress, Intersection, or GeoIntersection objects.

Parameters
mqlcLocations:LocationCollection — mqlcLocations Collection of locations. (Please Note: This object will not be updated, it is simply used for the request.)
 
mqroOptions:RouteOptions — mqroOptions Route options object, to modify behavior of route. (Please Note: This object will not be updated, it is simply used for the request.)
 
strSessionUID:String — strSessionUID The unique Session ID.
doRouteMatrix()method 
public function doRouteMatrix(mqlcLocations:LocationCollection, bAllToAll:Boolean, mqroOptions:RouteOptions):void

Calculates a route matrix. Either a drive time (many-to-many) or a multi-destination (one-to-many) route.

Parameters
mqlcLocations:LocationCollection — {LocationCollection} mqlcLocations Collection of location objects. The first member of the collection is the origin. If allToAll is true then the last member is the destination. Each location must be a GeoAddress (Please Note: This object will not be updated, it is simply used for the request.)
 
bAllToAll:Boolean — {boolean} bAllToAll If true then a matrix of time and distance from each location to all others is found. If false, time and distance from the first location (origin) to all others is found.
 
mqroOptions:RouteOptions — {RouteOptions} mqroOptions Specifies options for the route (fastest vs. shortest, coverage to use, roads to avoid, etc.). (Please Note: This object will not be updated, it is simply used for the request.)
geocode()method 
public function geocode(address:Location, theOptions:MQObject = null):void

Method to geocode an address or an intersection. Geocode options supply the QualityType and MatchType.

Parameters
address:Location — aAddress The Address object containing the necessary info for the address. (Please Note: This object will not be updated, it is simply used for the request.)
 
theOptions:MQObject (default = null) — theOptions The AutoGeocodeCovSwitch or GeocodeOptionsCollection to select a set of options stored on the server. (Please Note: This object will not be updated, it is simply used for the request.)
getClientConfigURL()method 
public function getClientConfigURL():String

Returns
String
getClientId()method 
public function getClientId():String

Returns the client id for authentication for this request.

Returns
String — client id
getPassword()method 
public function getPassword():String

Returns the password for authentication for this request.

Returns
String — password
getRecordInfo()method 
public function getRecordInfo(mqscFieldNames:StringCollection, mqdlqQuery:DBLayerQuery, mqscRecIds:StringCollection):void

Generates a request to the MapQuest server (as specified by the server name, path, and port number) to perform a DB Search based on either the recordIds received or the extraCriteria info of the dblayerquery. The resulting recordset contains fields specified by the scFieldNames param.

Parameters
mqscFieldNames:StringCollection — {StringCollection} mqscFieldNames containing the names of the fields to return, or blank for all fields. (Please Note: This object will not be updated, it is simply used for the request.)
 
mqdlqQuery:DBLayerQuery — {DBLayerQuery} mqdlqQuery Contains the name of the dblayer/table to query. Optionally contains ExtraCriteria. Utilized only if RecordIds are empty. (Please Note: This object will not be updated, it is simply used for the request.)
 
mqscRecIds:StringCollection — {StringCollection} mqscRecIds RecordIdentifiers of the records to return stored in a StringCollection. (Please Note: This object will not be updated, it is simply used for the request.)
getRouteBoundingBoxFromSessionResponse()method 
public function getRouteBoundingBoxFromSessionResponse(sessionId:String, previousRequestObjs:Array = null):void

Sets the rectLL appropriately for tilemaps routing

Parameters
sessionId:String — The unique Session ID.
 
previousRequestObjs:Array (default = null) — - Optional - This is an array of objects assocaiated with the call prior to this one (probably doRoute) this way all the event handelers can get all objects associated with this call.
getServerInfo()method 
public function getServerInfo(lType:int = 0):void

Returns the string which specifies the coverage information requested directly via an http request.

Parameters
lType:int (default = 0) — lType Type of info to return, 0=CoverageInfo, 1=MapDataSelectorInfo.
getServerName()method 
public function getServerName(transType:String = null):String

Returns the name of the server which will be used to satisfy this request.

Parameters
transType:String (default = null)

Returns
String — The name of the server which will be used to satisfy this request.
getServerPath()method 
public function getServerPath(transType:String = null):String

Returns the path to the server which will be used to satisfy this request.

Parameters
transType:String (default = null)

Returns
String — The path to the server which will be used to satisfy this request.
getServerPort()method 
public function getServerPort(transType:String = null):int

Returns the port number of the server which will be used to satisfy this request.

Parameters
transType:String (default = null)

Returns
int — The port number of the server which will be used to satisfy this request.
getSession()method 
public function getSession(strSessionID:String, responseType:String = "mqSession"):void

getSession - Get the session object from the server.

Parameters
strSessionID:String
 
responseType:String (default = "mqSession")
getTransactionInfo()method 
public function getTransactionInfo():String

Gets data to be passed to the server to be logged with any subsequent requests in the transaction log.

Returns
String — Transaction Information
reverseGeocode()method 
public function reverseGeocode(mqllLatLng:LatLng, strMapCovName:String = "", strGeocodeCovName:String = ""):void

Finds the address at a given latitude/longitude position. A successful call will return a LocationCollection in containing the results of the reverse geocode. It will contain only GeoAddress objects.

Parameters
mqllLatLng:LatLng — mqllLatLng The latitude/longitude position to use for the reverse geocode. (Please Note: This object will not be updated, it is simply used for the request.)
 
strMapCovName:String (default = "") — strMapCovName The name of the mapping coverage to be used for the reverse geocode.
 
strGeocodeCovName:String (default = "") — strGeocodeCovName An optional parameter, specifies the geocode coverage to use for the reverse geocode. If specified, using this geocode coverage, a ZIP code lookup will be performed on the addresses found in the mapping data to verify and fill in the city/state information for the address. If not specified, only ZIP code and, if available, street information found in the mapping data will be returned.
search()method 
public function search(mqscCriteria:SearchCriteria, strCoverageName:String, mqdlqcDbLayers:DBLayerQueryCollection, mqfcFeatures:FeatureCollection = null, mqdcDisplayTypes:DTCollection = null):void

Generates a request to the MapQuest server (as specified by the server name, path, and port number) to perform a search and return the results in a FeatureCollection object.

Parameters
mqscCriteria:SearchCriteria — {SearchCriteria} mqscCriteria Spatial parameters for the search. (Please Note: This object will not be updated, it is simply used for the request.)
 
strCoverageName:String — strCoverageName The name of the map data coverage if searching for features in the map data.
 
mqdlqcDbLayers:DBLayerQueryCollection — mqdlqcDbLayers Database parameters for the search. (Please Note: This object will not be updated, it is simply used for the request.)
 
mqfcFeatures:FeatureCollection (default = null) — mqfcFeatures A FeatureCollection to also be searched based on the spatial criteria. (Please Note: This object will not be updated, it is simply used for the request.)
 
mqdcDisplayTypes:DTCollection (default = null) — mqdcDisplayTypes A DTCollection to narrow the search. Only those features with display types corresponding to those in this collection will be returned. (Please Note: This object will not be updated, it is simply used for the request.)
setClientConfigURL()method 
public function setClientConfigURL(configURL:String):void

Set the location of the client configuration file. Client configuration file can contain the following values. clientId password geocodeServerName geocodeServerPath geocodeServerPort routeServerName routeServerPath routeServerPort spatialServerName spatialServerPath spatiialServerPort

Parameters
configURL:String
setClientId()method 
public function setClientId(clientId:String):void

Sets the client id for authentication for this request.

Parameters
clientId:String — {String} client id
setPassword()method 
public function setPassword(password:String):void

Sets the password for authentication for this request.

Parameters
password:String — {String} password
setServerName()method 
public function setServerName(serverName:String):void

Sets the name of the server which is to be used to satisfy this request.

Parameters
serverName:String — strServerName The name of the MapQuest Server which is to be used to satisfy this request.
setServerPath()method 
public function setServerPath(serverPath:String):void

Sets the path to the server which is to be used to satisfy this request.

Parameters
serverPath:String — {String} strServerPath The path to the server which is to be used to satisfy this request.
setServerPort()method 
public function setServerPort(serverPort:int):void

Sets the port number to the server which is to be used to satisfy this request.

Parameters
serverPort:int — {int} nServerPort The port number of the server which is to be used to satisfy this request.
setTransactionInfo()method 
public function setTransactionInfo(xInfo:String):void

Sets data to be passed to the server to be logged with any subsequent requests in the transaction log. (Max 8 characters)

Parameters
xInfo:String — strXInfo Transaction Info.