# OpenLayers.Geometry.Rectangle

This class is not supported, and probably isn’t what you’re looking for. Instead, most users probably want something like:

>     var poly = new OpenLayers.Bounds(0,0,10,10).toGeometry();

This will create a rectangular Polygon geometry.

#### Inherits

- OpenLayers.Geometry

Summary

OpenLayers.Geometry.Rectangle | This class is not supported, and probably isn’t what you’re looking for.
Properties |
x | {Float}
y | {Float}
width | {Float}
height | {Float}
Constructor |
OpenLayers.Geometry.Rectangle |
Functions |
calculateBounds | Recalculate the bounds for the geometry.
getLength | {Float} The length of the geometry
getArea | {Float} The area of the geometry

### Properties

### x

{Float}

### y

{Float}

### width

{Float}

### height

{Float}

### Constructor

### OpenLayers.Geometry.Rectangle

#### Parameters

points | {Array(OpenLayers.Geometry.Point)}

### Functions

### calculateBounds

> calculateBounds: function()

Recalculate the bounds for the geometry.

### getLength

> getLength: function()

#### Returns

{Float} The length of the geometry

### getArea

> getArea: function()

#### Returns

{Float} The area of the geometry

> calculateBounds: function()

Recalculate the bounds for the geometry.

> getLength: function()

{Float} The length of the geometry

> getArea: function()

{Float} The area of the geometry
A Geometry is a description of a geographic object.
Point geometry class.
Close