|
MapQuest Advantage JavaScript API Reference Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--MQObject
|
+--MQLatLng
Contains a latitude/longitude pair.
Defined in mqcommon.js
| Field Summary | |
float |
lat
Value to represent the latitude |
float |
lng
Value to represent the longitude |
| Fields inherited from class MQObject |
m_xmlDoc, m_xpath
|
| Constructor Summary | |
MQLatLng
(<float/string> param1, <float> param2)
Constructs a new MQLatLng object. |
|
| Method Summary | |
double
|
arcDistance( <MQLatLng> ll2, <MQDistanceUnits> lUnits)
Calculates the distance between two lat/lng's in miles or meters. |
Boolean
|
equals(<MQLatLng> ll)
Determines whether or not two latlngs are equal. |
String
|
getClassName()
Returns the text name of this class. |
float
|
getLatitude()
Returns the latitude value. |
float
|
getLongitude()
Returns the longitude value. |
int
|
getObjectVersion()
Returns the version of this class. |
void
|
loadXml(<String> strXml)
Assigns the xml that relates to this object. |
String
|
saveXml()
Build an xml string that represents this object. |
void
|
setLatitude(<float> fLatitude)
Sets the latitude value. |
void
|
setLatLng(<float> fLatitude, <float> fLongitude)
Sets the latitude and longitude values. |
void
|
setLongitude(<float> fLongitude)
Sets the longitude value. |
string
|
toString()
Returns a string representation of this MQLatLng.
|
Boolean
|
valid()
Returns a true if both the latitude and longitude values are set to a value other than the static "INVALID" value. |
| Methods inherited from class MQObject |
getM_XmlDoc, setM_XmlDoc, getM_Xpath, setM_Xpath, setProperty, getProperty, copy, internalCopy
|
| Field Detail |
float lat
float lng
| Constructor Detail |
MQLatLng(<float/string> param1, <float> param2)
param1 - OPTIONAL: Depending on the absence of param2. If param2 exists then param1 is initial latitude (float - default is 0.0) otherwise param1 is xpath (string - default is "LatLng").
param2 - OPTIONAL: initial longitude (default is 0.0).
| Method Detail |
double arcDistance( <MQLatLng> ll2, <MQDistanceUnits> lUnits)
ll2 - Second lat,lng position to calculate distance to.
lUnits - Units to calculate distance
Boolean equals(<MQLatLng> ll)
ll - an MQLatLng object to be compared with this MQLatLng
String getClassName()
float getLatitude()
float getLongitude()
int getObjectVersion()
void loadXml(<String> strXml)
strXml - the xml to be assigned.
String saveXml()
void setLatitude(<float> fLatitude)
fLatitude - the value to set lat to
void setLatLng(<float> fLatitude, <float> fLongitude)
fLatitude - the value to set lat to
fLongitude - the value to set lng to
void setLongitude(<float> fLongitude)
fLongitude - the value to set lng to
string toString()
MQLatLng.
The format is "latitude,longitude".MQLatLng.
Boolean valid()
|
MapQuest Advantage JavaScript API Reference Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||