A LineString is a Curve which, once two points have been added to it, can never be less than two points long.
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. |
Constructor | |
OpenLayers. Geometry. LineString | Create a new LineString geometry |
Functions | |
removeComponent | Only allows removal of a point if there are three or more points in the linestring. |
intersects | Test for instersection between two geometries. |
getSortedSegments | {Array} An array of segment objects. |
Create a new LineString geometry
points | {Array(OpenLayers.Geometry.Point)} An array of points used to generate the linestring |
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)
point | {OpenLayers.Geometry.Point} The point to be removed |
intersects: function( geometry )
Test for instersection between two geometries. This is a cheapo implementation of the Bently-Ottmann algorigithm. It doesn’t really keep track of a sweep line data structure. It is closer to the brute force method, except that segments are sorted and potential intersections are only calculated when bounding boxes intersect.
geometry | {OpenLayers.Geometry} |
{Boolean} The input geometry intersects this geometry.
Only allows removal of a point if there are three or more points in the linestring.
removeComponent: function( point )
Test for instersection between two geometries.
intersects: function( geometry )
{Array} An array of segment objects.
getSortedSegments: function()