geometry.base.LineString
Extends IBaseLineStringGeometry.
The "Polyline" base geometry.
Constructor | Fields | Events | Methods
Constructor
geometry.base.LineString([coordinates])
Parameters:
Parameter |
Default value |
Description |
[] |
Type: Number[][] Geometry coordinates. |
Example:
var lineString = new ymaps.geometry.base.LineString([
[30, 50], [31, 51], [32, 52]
]);
//...
lineString.set(1, [20, 40]).remove(2);
Fields
Name |
Type |
Description |
Geometry event manager. |
Events
Name |
Description |
Changed coordinates. Instance of the Event class. Names of fields that are available via the Event.get method:
Inherited from ILineStringGeometryAccess. |
Methods
Name |
Returns |
Description |
freeze() |
Switches the object to "frozen" mode. Inherited from IFreezable. |
|
Number[] |
Returns coordinates of the point with the specified index. Inherited from ILineStringGeometryAccess. |
|
Number[][]|null |
Returns coordinates of the two opposite corners of the area that surrounds the geometry. The first item in the array is the corner with the smallest coordinate values relative to the rest of the points in the area; the second item is the corner with the largest coordinate values. Inherited from IBaseGeometry. |
|
Creates and returns an IPointGeometryAccess object for the specified vertex on the polyline. Inherited from ILineStringGeometryAccess. |
||
Object |
Searches for a point on the polyline closest to the anchorPosition. Inherited from ILineStringGeometryAccess. |
|
Number[][] |
Returns an array of geometry coordinates. Inherited from ILineStringGeometryAccess. |
|
Integer |
Returns the number of points in the geometry. Inherited from ILineStringGeometryAccess. |
|
getType() |
String |
Returns the "LineString" string. Inherited from IBaseLineStringGeometry. |
Adds a new point with the specified index. Inherited from ILineStringGeometryAccess. |
||
isFrozen() |
Boolean |
Returns true if the object is in "frozen" mode, otherwise false. Inherited from IFreezable. |
Number[] |
Removes the point with the specified index. Inherited from ILineStringGeometryAccess. |
|
Sets coordinates of the point with the specified index. Inherited from ILineStringGeometryAccess. |
||
Sets an array of geometry coordinates. Inherited from ILineStringGeometryAccess. |
||
Number[][] |
Deletes a defined number of points, starting from the specified index. New points can be added in place of the deleted ones. Coordinates of the new points can be passed as additional arguments after the "number" parameter. Inherited from ILineStringGeometryAccess. |
|
unfreeze() |
Switches the object to active mode. Inherited from IFreezable. |
Fields details
events
{event.Manager} events
Geometry event manager.