geometry.base.Rectangle
Extends IBaseRectangleGeometry.
The "Rectangle" base geometry.
Constructor | Fields | Events | Methods
Constructor
geometry.base.Rectangle([coordinates])
Parameters:
Parameter |
Default value |
Description |
null |
Type: Number[][]|null An array containing coordinates of two opposite corners of the rectangle. |
Example:
var rectangle = new ymaps.geometry.base.Rectangle([
[30, 50], [31, 51]
]);
Fields
Name |
Type |
Description |
Geometry event manager. |
Events
Name |
Description |
Change to corner coordinates. Instance of the Event class. Names of fields that are available via the Event.get method:
Inherited from IRectangleGeometryAccess. |
Methods
Name |
Returns |
Description |
Boolean |
Checks whether the passed point is located inside the rectangle. Inherited from IRectangleGeometryAccess. |
|
freeze() |
Switches the object to "frozen" mode. Inherited from IFreezable. |
|
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. |
|
Object |
Searches for the point nearest to "anchorPosition" on the rectangle contour. Inherited from IRectangleGeometryAccess. |
|
Number[][] |
Returns coordinates of two opposite corners of the rectangle. Inherited from IRectangleGeometryAccess. |
|
getType() |
String |
Returns the "Rectangle" string. Inherited from IBaseRectangleGeometry. |
isFrozen() |
Boolean |
Returns true if the object is in "frozen" mode, otherwise false. Inherited from IFreezable. |
Sets the coordinates of two opposite corners of the rectangle. Inherited from IRectangleGeometryAccess. |
||
unfreeze() |
Switches the object to active mode. Inherited from IFreezable. |
Fields details
events
{event.Manager} events
Geometry event manager.