Optional
components: Geometry[]The bounds of this geometry
The component parts of this geometry
An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.
A unique identifier for this geometry.
This is set when a Geometry is added as component of another geometry
Static
CLASS_Add a new component (geometry) to the collection. If this.componentTypes is set, then the component class name must be in the componentTypes array.
Return whether or not the geometry is at the specified location
Optional
toleranceLon: numberOptional
toleranceLat: numberRecalculate the bounds by iterating through the components and calling calling extendBounds() on each item.
Nullify this components bounds and that of its parent as well.
Clone this geometry.
Method: containsPoint Test if a point is inside a linear ring. For the case where a point is coincident with a linear ring edge, returns 1. Otherwise, returns boolean.
Parameters: point - {<OpenLayers.Geometry.Point>}
Returns: {Boolean | Number} The point is inside the linear ring. Returns 1 if the point is coincident with an edge. Returns boolean otherwise.
Destroy this geometry.
Calculate the closest distance between two geometries (on the x-y plane). Return {Number | Object} The distance between this geometry and the target. If details is true, the return will be an object with distance, x0, y0, x1, and x2 properties. The x0 and y0 properties represent the coordinates of the closest point on this geometry. The x1 and y1 properties represent the coordinates of the closest point on the target geometry.
Calculate the closest distance between two geometries (on the x-y plane). Return {Number | Object} The distance between this geometry and the target. If details is true, the return will be an object with distance, x0, y0, x1, and x2 properties. The x0 and y0 properties represent the coordinates of the closest point on this geometry. The x1 and y1 properties represent the coordinates of the closest point on the target geometry.
Optional
options: DistanceOptions<false>Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates.
Extend the existing bounds to include the new bounds. If geometry's bounds is not yet set, then set a new Bounds.
Calculate the area of this geometry. Note how this function is overridden in <OpenLayers.Geometry.Polygon>.
Get the bounds for this Geometry. If bounds is not set, it is calculated again, this makes queries faster.
Get a string representing the components for this collection
Calculate the approximate area of the polygon were it projected onto the earth.
Calculate the approximate length of the geometry were it projected onto the earth.
Calculate the length of this geometry
Method: getSortedSegments
Returns: {Array} An array of segment objects. Segment objects have properties x1, y1, x2, and y2. The start point is represented by x1 and y1. The end point is represented by x2 and y2. Start and end are ordered so that x1 < x2.
Return a list of all points in this geometry.
Moves a geometry by the given displacement along positive x and y axes. This modifies the position of the geometry and clears the cached bounds.
APIMethod: simplify This function will return a simplified LineString. Simplification is based on the Douglas-Peucker algorithm.
Parameters: tolerance - {number} threshhold for simplification in map units
Returns: {OpenLayers.Geometry.LineString} the simplified LineString
Method: split Use this geometry (the source) to attempt to split a target geometry.
Parameters: target - {<OpenLayers.Geometry>} The target geometry. options - {Object} Properties of this object will be used to determine how the split is conducted.
Valid options: mutual - {Boolean} Split the source geometry in addition to the target geometry. Default is false. edge - {Boolean} Allow splitting when only edges intersect. Default is true. If false, a vertex on the source must be within the tolerance distance of the intersection to be considered a split. tolerance - {Number} If a non-null value is provided, intersections within the tolerance distance of an existing vertex on the source will be assumed to occur at the vertex.
Returns: {Array} A list of geometries (of this same type as the target) that result from splitting the target with the source geometry. The source and target geometry will remain unmodified. If no split results, null will be returned. If mutual is true and a split results, return will be an array of two arrays - the first will be all geometries that result from splitting the source geometry and the second will be all geometries that result from splitting the target geometry.
Returns a text representation of the geometry. If the WKT format is included in a build, this will be the Well-Known Text representation.
Reproject the components geometry from source to dest.
Reproject the components geometry from source to dest.
Static
distanceFunction: OpenLayers.Geometry.distanceToSegment
Parameters: point - {Object} An object with x and y properties representing the point coordinates. segment - {Object} An object with x1, y1, x2, and y2 properties representing endpoint coordinates.
Returns: {Object} An object with distance, along, x, and y properties. The distance will be the shortest distance between the input point and segment. The x and y properties represent the coordinates along the segment where the shortest distance meets the segment. The along attribute describes how far between the two segment points the given point is.
Static
fromWKT
Creates a Geometry Collection -- a list of geoms.