OpenLayers. Geometry

A Geometry is a description of a geographic object.  Create an instance of this class with the OpenLayers.Geometry constructor.  This is a base class, typical geometry types are described by subclasses of this class.

Summary
A Geometry is a description of a geographic object.
{String} A unique identifier for this geometry.
{OpenLayers.Geometry}This is set when a Geometry is added as component of another geometry
{OpenLayers.Bounds} The bounds of this geometry
Creates a geometry object.
Destroy this geometry.
Calculate the length of this geometry.
Calculate the area of this geometry.
Returns the Well-Known Text representation of a geometry
{String} Name of class.

Properties

id

{String} A unique identifier for this geometry.

parent

{OpenLayers.Geometry}This is set when a Geometry is added as component of another geometry

bounds

{OpenLayers.Bounds} The bounds of this geometry

Functions

OpenLayers. Geometry

Creates a geometry object.

Returns

{OpenLayers.Geometry} geometry.

destroy

destroy: function()

Destroy this geometry.

getLength

getLength: function()

Calculate the length of this geometry.  This method is defined in subclasses.

Return

{Number} The length of the collection by summing its parts

getArea

getArea: function()

Calculate the area of this geometry.  This method is defined in subclasses.

Return

{Number} The area of the collection by summing its parts

toString

toString: function()

Returns the Well-Known Text representation of a geometry

Return

{String} Well-Known Text

Constants

CLASS_NAME

{String} Name of class.

Creates a geometry object.
Instances of this class represent bounding boxes.
destroy: function()
Destroy this geometry.
getLength: function()
Calculate the length of this geometry.
getArea: function()
Calculate the area of this geometry.
toString: function()
Returns the Well-Known Text representation of a geometry