|
MapQuest Advantage JavaScript API Reference Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--MQExec
Provides communication layer for requests to a server. Most, but
not all, of the functions generate actual requests to the MapQuest
Server. Within the context of this object, a Session object is used
to maintain information concerning the current client's requests.
Defined in mqexec.js
See:
| Field Summary | |
Object |
GEOCODE_VERSION
|
Object |
GETRECORDINFO_VERSION
|
Object |
GETSESSION_VERSION
|
<private> Object |
m_strXInfo
|
Object |
REVERSEGEOCODE_VERSION
|
Object |
ROUTE_VERSION
|
Object |
ROUTEMATRIX_VERSION
|
Object |
SEARCH_VERSION
|
| Constructor Summary | |
MQExec
( <String/MQExec> strServerNameORmqeObj, <String> strPathToServer, <int> nServerPort, <String> strProxyServerName, strPathToProxyServerPage, <int> nProxyServerPort )
Constructs new MQExec Object |
|
| Method Summary | |
void
|
batchGeocode(<MQLocationCollection> mqlcLocations, <MQLocationCollectionCollection> mqlccLocations, <MQAutoGeocodeCovSwitch/MQGeocodeOptionsCollection> theOptions)
Method to batch geocode a collection of locations. |
String
|
createSessionEx(<MQSession> mqsSession)
Generates a request to the MapQuest server (as specified by the server name, path, and port number) to create a user Session. |
void
|
doRoute(<MQLocationCollection> mqlcLocations, <MQRouteOptions> mqroOptions, <MQRouteResults> mqrrResults, <String> strSessionUID, <MQRectLL> mqRectLL)
Calculates a route using a collection of locations as origin and destination. |
void
|
doRouteMatrix(<MQLocationCollection> mqlcLocations, <boolean> bAllToAll, <MQRouteOptions> mqroOptions, <MQRouteMatrixResults> mqrmrResults)
Calculates a route matrix. |
<private> void
|
doTransaction(<String> strTransaction, <Array> arrRequest, strVersion )
Performs the given transaction by making AJAX call to the Proxy Server page. |
void
|
geocode(<MQAddress> mqaAddress, <MQLocationCollection> mqlcLocations, <MQAutoGeocodeCovSwitch/MQGeocodeOptionsCollection> theOptions)
Method to geocode an address or an intersection. |
String
|
getProxyServerName()
Returns the name or IP of the proxy server to connect to. |
void
|
getRecordInfo(<MQStringCollection> mqscFieldNames, <MQDBLayerQuery> mqdlqQuery, <MQRecordSet> mqrsResults, <MQStringCollection> mqscRecIds)
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. |
<private> void
|
getRequestXml(<String> strTransaction, <Array> arrRequest, <String> strVersion)
Prepares request XML data to be sent to the server for a given transaction and set of request objects. |
<private> void
|
getRouteBoundingBoxFromSessionResponse(sessionId, <MQRectLL> mqRectLL)
Sets the mqRectLL appropriately for tilemaps routing |
Document
|
getServerInfo( <int> lType )
Returns the string which specifies the coverage information requested directly via an http request. |
String
|
getServerName()
Returns the name of the server which will be used to satisfy this request. |
String
|
getServerPath()
Returns the path to the server which will be used to satisfy this request. |
int
|
getServerPort()
Returns the port number of the server which will be used to satisfy this request. |
void
|
getSession(strSessionID, mqObj)
|
<private> boolean
|
isAlive()
Returns a value indicating whether or not this object has been initialized to a map server and port number. |
void
|
reverseGeocode(<MQLatLng> mqllLatLng, <MQLocationCollection> mqlcLocations, <String> strMapCovName, <String> strGeocodeCovName)
Finds the address at a given latitude/longitude position. |
void
|
search(<MQSearchCriteria> mqscCriteria, <MQFeatureCollection> mqfcSearchResults, <String> strCoverageName, <MQDBLayerQueryCollection> mqdlqcDbLayers, <MQFeatureCollection> mqfcFeatures, <MQDTCollection> mqdcDisplayTypes)
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. |
void
|
setProxyServerName(<String> strProxyServerName)
Sets the name or IP of the proxy server to connect to. |
void
|
setServerName(<String> strServerName)
Sets the name of the server which is to be used to satisfy this request. |
void
|
setServerPath(<String> strServerPath)
Sets the path to the server which is to be used to satisfy this request. |
void
|
setServerPort(<int> nServerPort)
Sets the port number to the server which is to be used to satisfy this request. |
| Field Detail |
Object GEOCODE_VERSION
Object GETRECORDINFO_VERSION
Object GETSESSION_VERSION
<private> Object m_strXInfo
Object REVERSEGEOCODE_VERSION
Object ROUTE_VERSION
Object ROUTEMATRIX_VERSION
Object SEARCH_VERSION
| Constructor Detail |
MQExec( <String/MQExec> strServerNameORmqeObj, <String> strPathToServer, <int> nServerPort, <String> strProxyServerName, strPathToProxyServerPage, <int> nProxyServerPort )
strServerNameORmqeObj - MapQuest Server name (or) MQExec object to copy the server information.
strPathToServer - Path to the Server
nServerPort - HTTP Port of the Server
strProxyServerName - Name of the server hosting the Proxy page
nProxyServerPort - Port of the Server hosting the Proxy page strServerName, strPathToServer, and nServerPort are required properties that need to be set before the first request. If these properties are not specified, the defaults used for initialization are: MapServer = localhost PathToServer = mq HTTPPort = 80 Please Note: These defaults are not likely to match your configuration. If MQExec object is provided as the first parameter, remaining parameters will be ignored and server information will be copied from the provided object.
String - } strPathToProxyServerPage Path to the Proxy Server page
| Method Detail |
void batchGeocode(<MQLocationCollection> mqlcLocations, <MQLocationCollectionCollection> mqlccLocations, <MQAutoGeocodeCovSwitch/MQGeocodeOptionsCollection> theOptions)
mqlcLocations - The LocationCollection containing the necessary info for the addresses to be geocode. (Please Note: This object will not be updated, it is simply used for the request.)
mqlccLocations - The LocationCollectionCollection used to hold the results of the geocode.
theOptions - The AutoGeocodeCovSwitch or MQGeocodeOptionsCollection 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.)
String createSessionEx(<MQSession> mqsSession)
mqsSession - Object containing objects for the session. (Please Note: This object will not be updated, it is simply used for the request.)
void doRoute(<MQLocationCollection> mqlcLocations, <MQRouteOptions> mqroOptions, <MQRouteResults> mqrrResults, <String> strSessionUID, <MQRectLL> mqRectLL)
mqlcLocations - Collection of locations. (Please Note: This object will not be updated, it is simply used for the request.)
mqroOptions - Route options object, to modify behavior of route. (Please Note: This object will not be updated, it is simply used for the request.)
mqrrResults - The results of the route request.
strSessionUID - The unique Session ID.
mqRectLL - The bounding box to provide to the TileMap ToolKit. This parameter is optional
void doRouteMatrix(<MQLocationCollection> mqlcLocations, <boolean> bAllToAll, <MQRouteOptions> mqroOptions, <MQRouteMatrixResults> mqrmrResults)
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 - 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 - 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.)
mqrmrResults - Contains the time and distance matrix as well as the status of the call (success, failure, partial success)
<private> void doTransaction(<String> strTransaction, <Array> arrRequest, strVersion )
strTransaction - Name of the transaction
arrRequest - Array of request objects
void geocode(<MQAddress> mqaAddress, <MQLocationCollection> mqlcLocations, <MQAutoGeocodeCovSwitch/MQGeocodeOptionsCollection> theOptions)
mqaAddress - 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.)
mqlcLocations - The LocationCollection to hold the results of the geocode.
theOptions - The AutoGeocodeCovSwitch or MQGeocodeOptionsCollection 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.)
String getProxyServerName()
void getRecordInfo(<MQStringCollection> mqscFieldNames, <MQDBLayerQuery> mqdlqQuery, <MQRecordSet> mqrsResults, <MQStringCollection> mqscRecIds)
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 - 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.)
mqrsResults - The Returned RecordSet containg the records and fields matching the input parameters.
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.)
<private> void getRequestXml(<String> strTransaction, <Array> arrRequest, <String> strVersion)
strTransaction - Name of the transaction
arrRequest - Array of request objects to form the XML
strVersion - Version of the transaction implementation
<private> void getRouteBoundingBoxFromSessionResponse(sessionId, <MQRectLL> mqRectLL)
mqRectLL - The bounding box for the route in the session.
strSessionUID - The unique Session ID.
Document getServerInfo( <int> lType )
lType - Type of info to return, 0=CoverageInfo, 1=MapDataSelectorInfo.
String getServerName()
String getServerPath()
int getServerPort()
void getSession(strSessionID, mqObj)
<private> boolean isAlive()
true if the port number or the Server name is not equal to their uninitialized values, false otherwise.
void reverseGeocode(<MQLatLng> mqllLatLng, <MQLocationCollection> mqlcLocations, <String> strMapCovName, <String> strGeocodeCovName)
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.)
mqlcLocations - A LocationCollection in which to return the results of the reverse geocode. It will contain only GeoAddress objects.
strMapCovName - The name of the mapping coverage to be used for the reverse geocode.
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.
void search(<MQSearchCriteria> mqscCriteria, <MQFeatureCollection> mqfcSearchResults, <String> strCoverageName, <MQDBLayerQueryCollection> mqdlqcDbLayers, <MQFeatureCollection> mqfcFeatures, <MQDTCollection> mqdcDisplayTypes)
mqscCriteria - Spatial parameters for the search. (Please Note: This object will not be updated, it is simply used for the request.)
mqfcSearchResults - Search results.
strCoverageName - The name of the map data coverage if searching for features in the map data.
mqdlqcDbLayers - Database parameters for the search. (Please Note: This object will not be updated, it is simply used for the request.)
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 - 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.)
void setProxyServerName(<String> strProxyServerName)
strProxyServerName - The name of the proxy server.
void setServerName(<String> strServerName)
strServerName - The name of the MapQuest Server which is to be used to satisfy this request.
void setServerPath(<String> strServerPath)
strServerPath - The path to the server which is to be used to satisfy this request.
void setServerPort(<int> nServerPort)
nServerPort - The port number of the server which is to be used to satisfy this request.
|
MapQuest Advantage JavaScript API Reference Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||