com.google.maps.gwt.client
Class LatLng

java.lang.Object
  extended by JavaScriptObject
      extended by com.google.maps.gwt.client.LatLng

public class LatLng
extends JavaScriptObject

LatLng is a point in geographical coordinates, latitude and longitude.

Notice that although usual map projections associate longitude with the x-coordinate of the map, and latitude with the y-coordinate, the latitude coordinate is always written first, followed by the longitude.

Notice also that you cannot modify the coordinates of a LatLng . If you want to compute another point, you have to create a new one. THIS SOURCE CODE IS GENERATED, DO NOT MODIFY


Constructor Summary
protected LatLng()
          Protected constructor avoids default public constructor.
 
Method Summary
static LatLng create(double lat, double lng)
          Notice the ordering of latitude and longitude.
static LatLng create(double lat, double lng, boolean noWrap)
          Notice the ordering of latitude and longitude.
 boolean equals(LatLng other)
          Comparison function.
 double lat()
          Returns the latitude in degrees.
 double lng()
          Returns the longitude in degrees.
 java.lang.String toUrlValue()
          Returns a string of the form "lat,lng" for this LatLng.
 java.lang.String toUrlValue(double precision)
          Returns a string of the form "lat,lng" for this LatLng.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatLng

protected LatLng()
Protected constructor avoids default public constructor.

Method Detail

create

public static LatLng create(double lat,
                            double lng,
                            boolean noWrap)
Notice the ordering of latitude and longitude. If the noWrap flag is true, then the numbers will be used as passed, otherwise latitude will be clamped to lie between -90 degrees and +90 degrees, and longitude will be wrapped to lie between -180 degrees and +180 degrees.


create

public static LatLng create(double lat,
                            double lng)
Notice the ordering of latitude and longitude. If the noWrap flag is true, then the numbers will be used as passed, otherwise latitude will be clamped to lie between -90 degrees and +90 degrees, and longitude will be wrapped to lie between -180 degrees and +180 degrees.


equals

public final boolean equals(LatLng other)
Comparison function.


lat

public final double lat()
Returns the latitude in degrees.


lng

public final double lng()
Returns the longitude in degrees.


toUrlValue

public final java.lang.String toUrlValue(double precision)
Returns a string of the form "lat,lng" for this LatLng. We round the lat/lng values to 6 decimal places by default.


toUrlValue

public final java.lang.String toUrlValue()
Returns a string of the form "lat,lng" for this LatLng. We round the lat/lng values to 6 decimal places by default.