com.googlecode.gwtmapquest.transaction
Class MQALatLng

java.lang.Object
  extended by JavaScriptObject
      extended by com.googlecode.gwtmapquest.transaction.MQALatLng

public class MQALatLng
extends JavaScriptObject


Constructor Summary
protected MQALatLng()
           
 
Method Summary
 double arcDistance(MQALatLng otherPoint, MQDistanceUnits units)
          Calculates the distance between two lat/lng�s in miles or meters.
 boolean equalsNative(MQALatLng other)
          Returns whether or not two latlngs are equal.
 double getLatitude()
           
 double getLongitude()
           
 void loadXml(java.lang.String xml)
           
static MQALatLng newInstance()
           
static MQALatLng newInstance(double latitude, double longitude)
           
static MQALatLng newInstance(java.lang.String xPath)
           
 void setLatitude(double value)
           
 void setLatLng(double latitude, double longitude)
          Sets the latitude and longitude values.
 void setLongitude(double value)
           
 boolean toStringNative()
          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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQALatLng

protected MQALatLng()
Method Detail

newInstance

public static MQALatLng newInstance(double latitude,
                                    double longitude)

newInstance

public static MQALatLng newInstance(java.lang.String xPath)

newInstance

public static MQALatLng newInstance()

getLatitude

public final double getLatitude()

setLatitude

public final void setLatitude(double value)

getLongitude

public final double getLongitude()

setLongitude

public final void setLongitude(double value)

setLatLng

public final void setLatLng(double latitude,
                            double longitude)
Sets the latitude and longitude values.

Parameters:
latitude -
longitude -

arcDistance

public final double arcDistance(MQALatLng otherPoint,
                                MQDistanceUnits units)
Calculates the distance between two lat/lng�s in miles or meters. If the units parameter is not provide, then miles will be the default.

Parameters:
otherPoint - Second lat,lng position to calculate distance to.
units - Units to calculate distance
Returns:

valid

public final boolean valid()
Returns a true if both the latitude and longitude values are set to a value other than the static �INVALID� value.

Returns:

equalsNative

public final boolean equalsNative(MQALatLng other)
Returns whether or not two latlngs are equal. Two instances of MQA.LatLng are equal if the values of their latitude and longitude member fields, representing their position in the coordinate space, are the same.

Parameters:
other -
Returns:

toStringNative

public final boolean toStringNative()
Returns a string representation of this MQLatLng. The format is �latitude,longitude�.

Returns:

loadXml

public final void loadXml(java.lang.String xml)