Class Index | File Index

Classes


Class geo.Polygon


Defined in: extensions.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
geo.Polygon(outerBoundary, innerBoundaries)
Creates a new polygon from the given parameters.
Method Summary
Method Attributes Method Name and Description
 
area()
Returns the approximate area of the polygon.
 
Returns the latitude/longitude bounds wholly containing this polygon.
 
Returns whether or not the polygon contains the given point.
 
Returns an array containing the polygon's inner boundaries.
 
Returns whether or not the polygon's outer boundary coordinates are in counter clockwise order.
 
Ensures that the polygon's outer boundary coordinates are in counter clockwise order by reversing them if they are counter clockwise.
 
Returns the polygon's outer boundary path.
 
Returns the string representation of the polygon, useful primarily for debugging purposes.
Class Detail
geo.Polygon(outerBoundary, innerBoundaries)
Creates a new polygon from the given parameters.
Parameters:
{geo.Polygon|geo.Path} outerBoundary
The polygon's outer boundary.
{geo.Path[]} innerBoundaries Optional
The polygon's inner boundaries, if any.
Method Detail
{Number} area()
Returns the approximate area of the polygon.
Returns:
{Number} The approximate area, in square meters.
See:
geo.Path.area

{geo.Bounds} bounds()
Returns the latitude/longitude bounds wholly containing this polygon.

containsPoint(point)
Returns whether or not the polygon contains the given point.
Parameters:
point
See:
geo.Path.containsPoint
http://econym.googlepages.com/epoly.htm

{geo.Path[]} innerBoundaries()
Returns an array containing the polygon's inner boundaries. You may freely add or remove geo.Path objects to this array.

{Boolean} isCounterClockwise()
Returns whether or not the polygon's outer boundary coordinates are in counter clockwise order.

makeCounterClockwise()
Ensures that the polygon's outer boundary coordinates are in counter clockwise order by reversing them if they are counter clockwise.
See:
geo.Polygon.isCounterClockwise

{geo.Path} outerBoundary()
Returns the polygon's outer boundary path.

{String} toString()
Returns the string representation of the polygon, useful primarily for debugging purposes.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 30 2012 11:34:31 GMT-0700 (PDT)