|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mapquest.MQObject
com.mapquest.LatLng
Contains a latitude/longitude pair.
| Field Summary | |
static int |
CLASS_ID
|
static java.lang.String |
CLASS_NAME
|
| Fields inherited from class com.mapquest.MQObject |
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION |
| Constructor Summary | |
LatLng()
Default constructor. |
|
LatLng(double aLatitude,
double aLongitude)
Constructor for assigning latitude and longitude values. |
|
LatLng(LatLng aLatLng)
Copy constructor. |
|
| Method Summary | |
double |
arcDistance(LatLng ll2)
Calculates the distance between two lat/lng's in miles. |
double |
arcDistance(LatLng ll2,
DistanceUnits lUnits)
Calculates the distance between two lat/lng's in miles or meters. |
boolean |
equals(java.lang.Object otherObject)
Compares this object to the specified object. |
int |
getClassId()
Returns the numeric id of this class. |
java.lang.String |
getClassName()
Returns the text name of this class. |
double |
getLatitude()
Returns the latitude of this object. |
double |
getLongitude()
Returns the latitude of this object. |
int |
hashCode()
Returns a hash code for this LatLng. |
void |
init()
Initializes object. |
void |
setLatitude(double aLatitude)
Sets the latitude value. |
void |
setLatLng(double aLatitude,
double aLongitude)
Sets the latitude and longitude values. |
void |
setLongitude(double aLongitude)
Sets the longitude value. |
java.lang.String |
toString()
Converts the contents of this class to a comma-separated string. |
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 com.mapquest.MQObject |
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int CLASS_ID
public static final java.lang.String CLASS_NAME
| Constructor Detail |
public LatLng()
public LatLng(LatLng aLatLng)
aLatLng - A lat/long object that this object is to be
initialized to.
public LatLng(double aLatitude,
double aLongitude)
aLatitude - The latitude value.aLongitude - The longitude value.| Method Detail |
public void init()
init in class MQObjectpublic int getClassId()
getClassId in class MQObjectpublic java.lang.String getClassName()
getClassName in class MQObjectpublic boolean equals(java.lang.Object otherObject)
equals in class MQObjectotherObject - the object to compare this LatLng against.
public int hashCode()
hashCode in class MQObject
public void setLatLng(double aLatitude,
double aLongitude)
aLatitude - The latitude value.aLongitude - The longitude value.public void setLatitude(double aLatitude)
aLatitude - The latitude value to which this object is to be
set.
public void setLongitude(double aLongitude)
aLongitude - The longitude value to which this object is to be
set.
public double getLatitude()
public double getLongitude()
public boolean valid()
public java.lang.String toString()
MQObject
toString in class MQObjectpublic double arcDistance(LatLng ll2)
ll2 - Second lat,lng position to calculate distance to.
public double arcDistance(LatLng ll2,
DistanceUnits lUnits)
ll2 - Second lat,lng position to calculate distance to.lUnits - Units to calculate distace, defaults to miles
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||