Yahoo! UI Library

CHZERO  1.0.0

Yahoo! UI Library > CHZERO > OpenLayers.Geometry.LinearRing
Search:
 
Filters

Class OpenLayers.Geometry.LinearRing - extends OpenLayers.Geometry.LineString

OpenLayers.Geometry.LinearRing
A Linear Ring is a special LineString which is closed. It closes itself automatically on every addPoint/removePoint by adding a copy of the first point as the last point.

Also, as it is the first in the line family to close itself, a getArea() function is defined to calculate the enclosed area of the linearRing

Constructor

OpenLayers.Geometry.LinearRing ( points )
Parameters:
points <Array(OpenLayers.Geometry.Point)>

Properties inherited from OpenLayers.Geometry.Collection:

Methods

addComponents

void addComponents ( components )
Parameters:
components <Array(OpenLayers.Geometry)>

getArea

Float getArea ( )
Returns: Float
area

getCentroid

OpenLayers.Geometry.Point getCentroid ( weighted )
Parameters:
weighted <Boolean>
Returns: OpenLayers.Geometry.Point
centroid

getGeodesicArea

Float getGeodesicArea ( projection )
Parameters:
projection <OpenLayers.Projection>
Returns: Float
geodesic area

getVertices

Array getVertices ( nodes )
Parameters:
nodes <Boolean>
Returns: Array
vertices

intersects

Boolean intersects ( geometry )
Parameters:
geometry <OpenLayers.Geometry>
Returns: Boolean
intersects

move

void move ( x , y )
Parameters:
x <Float>
y <Float>

removeComponents

Boolean removeComponents ( components )
Parameters:
components <Array(OpenLayers.Geometry)>
Returns: Boolean
was removed

resize

void resize ( scale , origin , ratio )
Parameters:
scale <Float>
origin <OpenLayers.Geometry.Point>
ratio <Float> default 1.

rotate

void rotate ( angle , origin )
Parameters:
angle <Float> degree
origin <OpenLayers.Geometry.Point> center point

transform

OpenLayers.Geometry transform ( source , dest )
Parameters:
source <OpenLayers.Projection>
dest <OpenLayers.Projection>
Returns: OpenLayers.Geometry
geometry


Copyright © 2012 Yahoo! Inc. All rights reserved.