geometry.base.LinearRing
Extends IBaseLinearRingGeometry.
The "Closed contour" base geometry.
Constructor | Fields | Events | Methods
Constructor
geometry.base.LinearRing([coordinates[, fillRule]])
Parameters:
Parameter |
Default value |
Description |
[] |
Type: Number[][] Geometry coordinates. |
|
"evenOdd" |
Type: String String ID that defines the polygon fill rule. Accepts one of two values:
|
Example:
var linearRing = new ymaps.geometry.base.LinearRing([
[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]
]);
//...
linearRing.set(1, [5, 10]);
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 ILinearRingGeometryAccess. |
Methods
Name |
Returns |
Description |
Boolean |
Checks whether the passed point is located inside the contour. Inherited from ILinearRingGeometryAccess. |
|
freeze() |
Switches the object to "frozen" mode. Inherited from IFreezable. |
|
Number[] |
Returns coordinates of the point with the specified index. Inherited from ILinearRingGeometryAccess. |
|
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 contour on the polyline. Inherited from ILinearRingGeometryAccess. |
||
Object |
Searches for a point on the contour closest to the anchorPosition. Inherited from ILinearRingGeometryAccess. |
|
Number[][] |
Returns an array of geometry coordinates. Inherited from ILinearRingGeometryAccess. |
|
String |
Returns ID of the fill rule. Inherited from ILinearRingGeometryAccess. |
|
Integer |
Returns the number of points in the geometry. Inherited from ILinearRingGeometryAccess. |
|
getType() |
String |
Returns the "LinearRing" string. Inherited from IBaseLinearRingGeometry. |
Adds a new point with the specified index. Inherited from ILinearRingGeometryAccess. |
||
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 ILinearRingGeometryAccess. |
|
Sets coordinates of the point with the specified index. Inherited from ILinearRingGeometryAccess. |
||
Sets an array of geometry coordinates. Inherited from ILinearRingGeometryAccess. |
||
Sets the contour fill rule. Inherited from ILinearRingGeometryAccess. |
||
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 ILinearRingGeometryAccess. |
|
unfreeze() |
Switches the object to active mode. Inherited from IFreezable. |
Fields details
events
{event.Manager} events
Geometry event manager.