Class Index | File Index

Classes


Class mxn.BoundingBox


Defined in: mxn.core.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
mxn.BoundingBox(swlat, swlon, nelat, nelon)
BoundingBox creates a new bounding box object
Method Summary
Method Attributes Method Name and Description
 
contains(point)
contains finds whether a given point is within a bounding box
 
extend(point)
extend extends the bounding box to include the new point
 
getNorthEast returns a LatLonPoint of the north-east point of the bounding box
 
getSouthWest returns a LatLonPoint of the south-west point of the bounding box
 
isEmpty finds if this bounding box has zero area
 
toSpan returns a LatLonPoint with the lat and lon as the height and width of the bounding box
Class Detail
mxn.BoundingBox(swlat, swlon, nelat, nelon)
BoundingBox creates a new bounding box object
Parameters:
{double} swlat
the latitude of the south-west point
{double} swlon
the longitude of the south-west point
{double} nelat
the latitude of the north-east point
{double} nelon
the longitude of the north-east point
Method Detail
{boolean} contains(point)
contains finds whether a given point is within a bounding box
Parameters:
{LatLonPoint} point
the point to test with
Returns:
whether point is within this bounding box

extend(point)
extend extends the bounding box to include the new point
Parameters:
point

{LatLonPoint} getNorthEast()
getNorthEast returns a LatLonPoint of the north-east point of the bounding box
Returns:
the north-east point of the bounding box

{LatLonPoint} getSouthWest()
getSouthWest returns a LatLonPoint of the south-west point of the bounding box
Returns:
the south-west point of the bounding box

{boolean} isEmpty()
isEmpty finds if this bounding box has zero area
Returns:
whether the north-east and south-west points of the bounding box are the same point

{LatLonPoint} toSpan()
toSpan returns a LatLonPoint with the lat and lon as the height and width of the bounding box
Returns:
a LatLonPoint containing the height and width of this bounding box

©2009
Documentation generated by JsDoc Toolkit 2.1.1 on Sat Mar 10 2012 13:30:32 GMT-0000 (GMT)