com.mapitz.gwt.googleMaps.client
Class GLatLngBounds

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.mapitz.gwt.googleMaps.client.GLatLngBounds

public class GLatLngBounds
extends com.google.gwt.core.client.JavaScriptObject

A GLatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180 degrees meridian.

Author:
aglaforge

Constructor Summary
GLatLngBounds(int opaque)
           
 
Method Summary
 boolean contains(GLatLng latlng)
          contains(latlng) Boolean Returns true iff the geographical coordinates of the point lie within this rectangle.
 boolean containsBounds(GLatLngBounds other)
          containsBounds(other) Boolean What the name says.
static GLatLngBounds create(GLatLng sw, GLatLng ne)
           
 boolean equals(GLatLngBounds other)
          equals(other) Boolean Returns true iff all parameters in this rectangle are equal to the parameters of the other, within a certain roundoff margin.
 void extend(GLatLng latlng)
          extend(latlng) none Enlarges this rectangle such that it contains the given point.
 GLatLng getCenter()
          getCenter() GLatLng Returns the point at the center of the rectangle.
 GLatLng getNorthEast()
          getNorthEast() GLatLng Returns the point at the north-east corner of the rectangle.
 GLatLng getSouthWest()
          getSouthWest() GLatLng Returns the point at the south-west corner of the rectangle.
 boolean intersects(GLatLngBounds other)
          intersects(other) Boolean What the name says.
 boolean isEmpty()
          isEmpty() Boolean Returns true if this rectangle is empty.
 boolean isFullLat()
          isFullLat() Boolean Returns true if this rectangle extends from the south pole to the north pole.
 boolean isFullLng()
          isFullLng() Boolean Returns true if this rectangle extends fully around the earth in the longitude direction.
 GLatLng toSpan()
          toSpan() GLatLng Returns a GLatLng whose cordinates represent the size of this rectangle.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GLatLngBounds

public GLatLngBounds(int opaque)
Method Detail

create

public static GLatLngBounds create(GLatLng sw,
                                   GLatLng ne)

equals

public boolean equals(GLatLngBounds other)
equals(other) Boolean Returns true iff all parameters in this rectangle are equal to the parameters of the other, within a certain roundoff margin.

Parameters:
other -
Returns:

contains

public boolean contains(GLatLng latlng)
contains(latlng) Boolean Returns true iff the geographical coordinates of the point lie within this rectangle.

Parameters:
latlng -
Returns:

intersects

public boolean intersects(GLatLngBounds other)
intersects(other) Boolean What the name says.

Parameters:
other -
Returns:

containsBounds

public boolean containsBounds(GLatLngBounds other)
containsBounds(other) Boolean What the name says.

Parameters:
other -
Returns:

extend

public void extend(GLatLng latlng)
extend(latlng) none Enlarges this rectangle such that it contains the given point. In longitude direction, it is enlarged in the smaller of the two possible ways. If both are equal, it is enlarged at the eastern boundary.

Parameters:
latlng -

getSouthWest

public GLatLng getSouthWest()
getSouthWest() GLatLng Returns the point at the south-west corner of the rectangle.

Returns:

getNorthEast

public GLatLng getNorthEast()
getNorthEast() GLatLng Returns the point at the north-east corner of the rectangle.

Returns:

toSpan

public GLatLng toSpan()
toSpan() GLatLng Returns a GLatLng whose cordinates represent the size of this rectangle.

Returns:

isFullLat

public boolean isFullLat()
isFullLat() Boolean Returns true if this rectangle extends from the south pole to the north pole.

Returns:

isFullLng

public boolean isFullLng()
isFullLng() Boolean Returns true if this rectangle extends fully around the earth in the longitude direction.

Returns:

isEmpty

public boolean isEmpty()
isEmpty() Boolean Returns true if this rectangle is empty.

Returns:

getCenter

public GLatLng getCenter()
getCenter() GLatLng Returns the point at the center of the rectangle. (Since 2.52)

Returns: