com.gwtext.client.widgets.map
Class BoundingBox

java.lang.Object
  extended by com.gwtext.client.core.JsObject
      extended by com.gwtext.client.widgets.map.BoundingBox

public class BoundingBox
extends JsObject

The bounding box of the map.


Field Summary
 
Fields inherited from class com.gwtext.client.core.JsObject
jsObj
 
Constructor Summary
BoundingBox(double swlat, double swlon, double nelat, double nelon)
           
BoundingBox(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 
Method Summary
 boolean contains(LatLonPoint latLonPoint)
          Whether a given point is within a bounding box.
 LatLonPoint getNorthEast()
          LatLonPoint of the north-east point of the bounding box
 LatLonPoint getSouthWest()
          LatLonPoint of the south-west point of the bounding box
static BoundingBox instance(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 boolean isEmpty()
          True if this bounding box has zero area.
 LatLonPoint toSpan()
          Return a LatLonPoint with the lat and lon as the height and width of the bounding box.
 
Methods inherited from class com.gwtext.client.core.JsObject
getJsObj, getProperties, isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundingBox

public BoundingBox(double swlat,
                   double swlon,
                   double nelat,
                   double nelon)

BoundingBox

public BoundingBox(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail

instance

public static BoundingBox instance(com.google.gwt.core.client.JavaScriptObject jsObj)

contains

public boolean contains(LatLonPoint latLonPoint)
Whether a given point is within a bounding box.

Parameters:
latLonPoint - the point
Returns:
true if given point is within a bounding box

getNorthEast

public LatLonPoint getNorthEast()
LatLonPoint of the north-east point of the bounding box

Returns:
LatLonPoint of the north-east point of the bounding box

getSouthWest

public LatLonPoint getSouthWest()
LatLonPoint of the south-west point of the bounding box

Returns:
LatLonPoint of the south-west point of the bounding box

isEmpty

public boolean isEmpty()
True if this bounding box has zero area.

Returns:
true if this bounding box has zero area

toSpan

public LatLonPoint toSpan()
Return a LatLonPoint with the lat and lon as the height and width of the bounding box.

Returns:
a LatLonPoint with the lat and lon as the height and width of the bounding box