OpenLayers. Geometry. LineString

A LineString is a Curve which, once two points have been added to it, can never be less than two points long.

Inherits from

  • <OpenLayers.Geometry.Curve>
Summary
A LineString is a Curve which, once two points have been added to it, can never be less than two points long.
Create a new LineString geometry
Only allows removal of a point if there are three or more points in the linestring.
{String} Name of class.

Functions

OpenLayers. Geometry. LineString

Create a new LineString geometry

Parameters

points{Array(OpenLayers.Geometry.Point)} An array of points used to generate the linestring

Return

{OpenLayers.Geometry.Point} A new Point geometry

removeComponent

removeComponent: function(point)

Only allows removal of a point if there are three or more points in the linestring.  (otherwise the result would be just a single point)

Parameters

point{OpenLayers.Geometry.Point} The point to be removed

Constants

CLASS_NAME

{String} Name of class.

removeComponent: function(point)
Only allows removal of a point if there are three or more points in the linestring.
Point geometry class.