---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Rectangle.md
  - https://yandex.ru/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/Rectangle.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/jsapi-v2-1/doc/en/llms.txt

# Rectangle

Extends [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md).

Rectangle. A geo object with the geometry [geometry.Rectangle](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometry.Rectangle.md).

**See** [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md)[geometry.Rectangle](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometry.Rectangle.md)

[Constructor](#constructor-summary) | [Fields](#properties-summary) | [Events](#events-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
Rectangle(geometry[, properties[, options]])
```

Creates a rectangle instance.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`geometry`](#param-geometry)[*](*star) | — | Type: Number[][]\|Object\|[IRectangleGeometry](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IRectangleGeometry.md)

Coordinates of two opposite corners, a hash object with geometery parameters, or a reference to the rectangle geometry object. ||
|| [`properties`](#param-properties) | — | Type: Object\|[IDataManager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDataManager.md)

Rectangle data. Can be set as a class instance implementing the [IDataManager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDataManager.md) interface, or as a hash. When options are set to default values, the following data fields are interpreted by a geo object: 
- hintContent - Content of the rectangle's popup hint.
- balloonContent - Content of the rectangle's balloon.
- balloonContentHeader - Content of the rectangle balloon title.
- balloonContentBody - Content of the main part of the rectangle's balloon.
- balloonContentFooter - Content of the lower part of the rectangle's balloon.
The balloonContent field is a shortcut for the balloonContentBody field, but if they are both set simultaneously, balloonContentBody takes priority. You can also add your own custom fields to the rectangle data and use them, for example, in the balloon layout. ||
|| [`options`](#param-options) | — | Type: Object

Rectangle options. Using this parameter, you can set options for the rectangle itself, as well as for its parts: 
- Options for the rectangle's [balloon](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Balloon.md#constructor-summary) with the `balloon` prefix.
- Options for the rectangle's [popup](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Hint.md#constructor-summary) hint with the `hint` prefix.
- Geometry options can be set without a prefix. See the description of the [IGeometry](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeometry.md) class for the [geometry.Rectangle](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometry.Rectangle.md) geometry. ||
|| [`options.cursor`](#param-options.cursor) | "pointer" | Type: String

Type of cursor over a rectangle. ||
|| [`options.draggable`](#param-options.draggable) | false | Type: Boolean

Checks whether the rectangle can be dragged. ||
|| [`options.fill`](#param-options.fill) | true | Type: Boolean

Whether the shape is filled. ||
|| [`options.fillColor`](#param-options.fillColor) | "0066ff99" | Type: String

Fill color. ||
|| [`options.fillImageHref`](#param-options.fillImageHref) | — | Type: String

Background image. When this option is enabled in **stretch** mode, the "fillColor" value is ignored. ||
|| [`options.fillMethod`](#param-options.fillMethod) | 'stretch' | Type: String

Type of background fill. Accepts one of two values: 
- stretch - The background image stretches to fit the size of the overlay.
- tile - The background image is repeated, without changing its size. This is similar to background-repeat in CSS. It can be used for filling a shape with a template. ||
|| [`options.fillOpacity`](#param-options.fillOpacity) | 1 | Type: Number

Fill transparency. ||
|| [`options.hasBalloon`](#param-options.hasBalloon) | true | Type: Boolean

Checks if the rectangle has the "balloon" field. ||
|| [`options.hasHint`](#param-options.hasHint) | true | Type: Boolean

Checks if the rectangle has the "hint" field. ||
|| [`options.interactiveZIndex`](#param-options.interactiveZIndex) | false | Type: Boolean

Enables automatically modifying the z-index of the rectangle depending on its state. ||
|| [`options.interactivityModel`](#param-options.interactivityModel) | "default#geoObject" | Type: String

Interactivity model. Available keys and their values are listed in the description of [interactivityModel.storage](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/interactivityModel.storage.md). ||
|| [`options.opacity`](#param-options.opacity) | 1 | Type: Number

Transparency. ||
|| [`options.openBalloonOnClick`](#param-options.openBalloonOnClick) | true | Type: Boolean

Checks whether to show the balloon when the rectangle is clicked on. ||
|| [`options.openEmptyBalloon`](#param-options.openEmptyBalloon) | false | Type: Boolean

Checks whether to show an empty balloon when the rectangle is clicked on. ||
|| [`options.openEmptyHint`](#param-options.openEmptyHint) | false | Type: Boolean

Checks whether to show an empty hint when the mouse pointer hovers over the rectangle. ||
|| [`options.openHintOnHover`](#param-options.openHintOnHover) | true | Type: Boolean

Checks whether to show an empty hint when the mouse pointer hovers over the rectangle. ||
|| [`options.outline`](#param-options.outline) | true | Type: Boolean

Whether the shape has an outline. ||
|| [`options.pane`](#param-options.pane) | "places" | Type: String

The key of the pane where the rectangle overlay is placed. ||
|| [`options.rectangleOverlay`](#param-options.rectangleOverlay) | "default#rectangle" | Type: String\|Function

Key identifier from [overlay.storage](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/overlay.storage.md) or the overlay class. The generator function accepts three parameters: 
- geometry: [IPixelCircleGeometry](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPixelCircleGeometry.md) - The pixel geometry itself.
- data: [IDataManager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDataManager.md) or Object - Overlay data.
- options: Object - The overlay options.
And returns [vow.Promise](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md). ||
|| [`options.strokeColor`](#param-options.strokeColor) | "0066ffff" | Type: String\|String[]

Color of the line or outline. You can set multiple values for a multistroke outline. ||
|| [`options.strokeOpacity`](#param-options.strokeOpacity) | 1 | Type: Number\|Number[]

Transparency of the line or outline. You can set multiple values for a multistroke outline. ||
|| [`options.strokeStyle`](#param-options.strokeStyle) | — | Type: String\|Object\|String[]\|Object[]

Style of the line or outline. Available styles are listed in the [graphics.style.stroke](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/graphics.style.stroke.md) object. ||
|| [`options.strokeWidth`](#param-options.strokeWidth) | 1 | Type: Number\|Number[]

Thickness of the line or outline. You can set multiple values for a multistroke outline. ||
|| [`options.syncOverlayInit`](#param-options.syncOverlayInit) | false | Type: Boolean

Enables synchronously adding an overlay to the map. By default, overlays are added to the map asynchronously to prevent the browser from hanging when adding a large number of geo objects. However, adding asynchronously does not allow accessing the overlay immediately after adding a rectangle to the map. ||
|| [`options.useMapMarginInDragging`](#param-options.useMapMarginInDragging) | true | Type: Boolean

When an object is dragged to the edge of the map, the map center changes automatically. Whether to use map margins when automatically shifting the map center with [map.margin.Manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Manager.md). ||
|| [`options.visible`](#param-options.visible) | true | Type: Boolean

Checks the visibility of the rectangle. ||
|| [`options.zIndex`](#param-options.zIndex) | — | Type: Number

The z-index of the rectangle in the normal state. Lowest priority. ||
|| [`options.zIndexActive`](#param-options.zIndexActive) | — | Type: Number

The z-index of the rectangle with an opened balloon. Highest priority. ||
|| [`options.zIndexDrag`](#param-options.zIndexDrag) | — | Type: Number

The z-index of the rectangle while dragging. ||
|| [`options.zIndexHover`](#param-options.zIndexHover) | — | Type: Number

The z-index of a rectangle when the mouse pointer is hovering over it. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
// Creating a geodesic circle with a radius of 1000 kilometers.
var circle = new ymaps.Circle([[50, 50], 1000000], {}, {
    draggable: true
});
// Adding the circle to the map.
myMap.geoObjects.add(circle);

// Creating a rectangle based on the circle's boundaries.
var rectangle = new ymaps.Rectangle(circle.geometry.getBounds(), {}, {
    fill: false,
    coordRendering: "boundsPath",
    strokeWidth: 4
});
// Adding the rectangle to the map.
myMap.geoObjects.add(rectangle);

// Updating the rectangle's coordinates when changing the circle geometry.
circle.geometry.events.add("change", function (event) {
    this.geometry.setCoordinates(event.get("target").getBounds());
}, rectangle);
```

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [balloon](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#balloon) | [geoObject.Balloon](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geoObject.Balloon.md) | Balloon for a geo object.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#balloon). ||
|| [editor](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Rectangle.md#editor) | null | An editor for the "Rectangle" geometry has not yet been implemented. ||
|| [events](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#events) | [event.Manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/event.Manager.md) | Event manager.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#events). ||
|| [geometry](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Rectangle.md#geometry) | [geometry.Rectangle](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geometry.Rectangle.md) | The "Rectangle" type of geometry. ||
|| [hint](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#hint) | [geoObject.Hint](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geoObject.Hint.md) | Geo object hint.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#hint). ||
|| [options](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#options) | [option.Manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/option.Manager.md) | Geo object options manager.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#options). ||
|| [properties](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#properties) | [data.Manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md) | Geo object data manager.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#properties). ||
|| [state](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#state) | [data.Manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md) | State of the geo object. Defined by the following fields: 
- active: Boolean - Indicates that a balloon is open on the geo object.
- hover: Boolean - Indicates that the mouse is currently pointed at the geo object.
- drag: Boolean - Indicates that the geo object is being dragged

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#state). ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [balloonclose](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-balloonclose) | Closing the balloon. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-balloonclose). ||
|| [balloonopen](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-balloonopen) | Opening a balloon on a geo object. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-balloonopen). ||
|| [beforedrag](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-beforedrag) | Event preceding the "drag" event. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- position - Coordinates relative to the document. Array in the format [pageX, pageY].
- pixelOffset - Array of two numbers that describe the pixel offset at this step.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.
Names of methods that are accessible via [Event.callMethod](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#callMethod): 
- setPixelOffset - This method is for correcting the value of the pixel offset that will 	actually be applied. It takes an argument with the new pixel offset in the form of an array of two numbers.
If the [Event.preventDefault](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#preventDefault) method is called for this event, a subsequent drag event will be canceled.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-beforedrag). ||
|| [beforedragstart](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-beforedragstart) | Event preceding the "dragstart" event. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- position - Coordinates relative to the document. Array in the format [pageX, pageY].
- domEvent - Source DOM event (as a [DomEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.
If the [Event.preventDefault](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#preventDefault) method is called for this event, any subsequent dragging, as well as the "dragstart" event, will be canceled.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-beforedragstart). ||
|| [click](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-click) | Single left-click on the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-click). ||
|| [contextmenu](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-contextmenu) | Calls the element's context menu. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-contextmenu). ||
|| [dblclick](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-dblclick) | Double left-click on the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-dblclick). ||
|| [drag](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-drag) | Dragging a geo object. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- position - Coordinates relative to the document. Array in the format [pageX, pageY].
- pixelOffset - Array of two numbers that describe the pixel offset at this step.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-drag). ||
|| [dragend](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-dragend) | End of geo object dragging. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- position - Coordinates relative to the document. Array in the format [pageX, pageY].
- domEvent - Source DOM event (as a [DomEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-dragend). ||
|| [dragstart](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-dragstart) | Start of geo object dragging. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- position - Coordinates relative to the document. Array in the format [pageX, pageY].
- domEvent - Source DOM event (as a [DomEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-dragstart). ||
|| [editorstatechange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-editorstatechange) | Change in the state of the editor for the geo object's geometry. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- originalEvent - Original event of the geometry editor.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-editorstatechange). ||
|| [geometrychange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#event-geometrychange) | Change to the geo object geometry. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- originalEvent: [IEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEvent.md) - Original event of the geometry.

Inherited from [IGeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#event-geometrychange). ||
|| [hintclose](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-hintclose) | Closing the hint. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-hintclose). ||
|| [hintopen](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-hintopen) | Opening a hint on a geo object. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

Inherited from [GeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/GeoObject.md#event-hintopen). ||
|| [mapchange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IParentOnMap.md#event-mapchange) | Map reference changed. Data fields: 
- oldMap - Old map.
- newMap - New map.

Inherited from [IParentOnMap](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IParentOnMap.md#event-mapchange). ||
|| [mousedown](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mousedown) | Pressing the mouse button over the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mousedown). ||
|| [mouseenter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mouseenter) | Pointing the cursor at the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mouseenter). ||
|| [mouseleave](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mouseleave) | Moving the cursor off of the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mouseleave). ||
|| [mousemove](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mousemove) | Moving the cursor over the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mousemove). ||
|| [mouseup](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mouseup) | Letting go of the mouse button over an object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-mouseup). ||
|| [multitouchend](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-multitouchend) | End of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface.

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-multitouchend). ||
|| [multitouchmove](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-multitouchmove) | Repeating event during multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Defines the touches property, which contains a list of touches. Every touch is described by an object that contains the following fields: 
- clientX - X coordinate of the touch relative to the viewable area of the browser.
- clientY - Y coordinate of the touch relative to the viewable area of the browser.
- pageX - X coordinate of the touch relative to the beginning of the document.
- pageY - Y coordinate of the touch relative to the beginning of the document.

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-multitouchmove). ||
|| [multitouchstart](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-multitouchstart) | Start of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Defines the touches property, which contains a list of touches. Every touch is described by an object that contains the following fields: 
- clientX - X coordinate of the touch relative to the viewable area of the browser.
- clientY - Y coordinate of the touch relative to the viewable area of the browser.
- pageX - X coordinate of the touch relative to the beginning of the document.
- pageY - Y coordinate of the touch relative to the beginning of the document.

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-multitouchstart). ||
|| [optionschange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange) | Change to the object options.

Inherited from [ICustomizable](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange). ||
|| [overlaychange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#event-overlaychange) | Change to the geo object overlay. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- overlay: [IOverlay](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOverlay.md)\|null - Reference to the overlay.
- oldOverlay: [IOverlay](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOverlay.md)\|null - Previous overlay of the geo object.

Inherited from [IGeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#event-overlaychange). ||
|| [parentchange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange) | The parent object reference changed.

Data fields:

- oldParent - Old parent.
- newParent - New parent.

Inherited from [IChild](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange). ||
|| [propertieschange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#event-propertieschange) | Change to the geo object data. Instance of the [Event](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. Names of fields that are available via the [Event.get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- originalEvent: [IEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEvent.md) - Original event of the data manager.

Inherited from [IGeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#event-propertieschange). ||
|| [wheel](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-wheel) | Mouse wheel scrolling. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the [MapEvent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md).

Inherited from [IDomEventEmitter](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IDomEventEmitter.md#event-wheel). ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [getMap](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IParentOnMap.md#getMap)() | [Map](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map.md) | Returns reference to the map.

Inherited from [IParentOnMap](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IParentOnMap.md#getMap). ||
|| [getOverlay](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#getOverlay)() | [vow.Promise](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Returns the promise object, which is confirmed by the overlay object at the time it is actually created, or is rejected with an appropriate error message.

Inherited from [IGeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#getOverlay). ||
|| [getOverlaySync](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#getOverlaySync)() | [IOverlay](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOverlay.md)\|null | The method provides synchronous access to the overlay.

Inherited from [IGeoObject](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IGeoObject.md#getOverlaySync). ||
|| [getParent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#getParent)() | [IParentOnMap](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IParentOnMap.md)\|null | Returns link to the parent object, or null if the parent element was not set.

Inherited from [IChildOnMap](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#getParent). ||
|| [setParent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent)([parent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent-param-parent)) | [IChildOnMap](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md) | Sets the parent object. If the null value is passed, the manager element will only be deleted from the current parent object.

Inherited from [IChildOnMap](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent). ||
|#

## Fields details {#field_detail}

### editor {#editor}

```javascript
{null} editor
```

An editor for the "Rectangle" geometry has not yet been implemented.

### geometry {#geometry}

```javascript
{geometry.Rectangle} geometry
```

The "Rectangle" type of geometry.

[*star]: Mandatory parameter/option.