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

# map.margin.Accessor

An object that provides access to the rectangular area in the margins manager.

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

## Constructor {#constructor-summary}

```javascript
map.margin.Accessor(screenArea)
```

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`screenArea`](#param-screenArea)[*](*star) | — | Type: Object

The rectangular area, which is set in screen coordinates. This area is defined as an object containing information about the margins from the map edges (left, top, right, bottom) and the dimensions of the area (width, height). The values can be set as percentages of the width/height of the map container.

Don't instantiate new instances of this class unless necessary. ||
|#

\* Mandatory parameter/option.

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [events](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md#events) | Event manager. ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [change](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md#event-change) | The rectangular area was changed. ||
|| [remove](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md#event-remove) | The accessor was deleted from the margins manager. ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [getArea](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md#getArea)() | Object | Returns the rectangular area. ||
|| [remove](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md#remove)() | [map.margin.Accessor](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md) | Deletes the rectangular area from the margins manager. ||
|| [setArea](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md#setArea)([screenArea](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md#setArea-param-screenArea)) | [map.margin.Accessor](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.margin.Accessor.md) | Returns self-reference. ||
|#

## Fields details {#field_detail}

### events {#events}

```javascript
events
```

Event manager.

## Events details {#event_detail}

### change {#change}

The rectangular area was changed.

### remove {#remove}

The accessor was deleted from the margins manager.

## Methods details {#method_detail}

### getArea {#getArea}

```javascript
{Object} getArea()
```

**Returns** the rectangular area.

### remove {#remove}

```javascript
{map.margin.Accessor} remove()
```

Deletes the rectangular area from the margins manager.

**Returns** self-reference.

### setArea {#setArea}

```javascript
{map.margin.Accessor} setArea(screenArea)
```

**Returns** self-reference.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`screenArea`](#setArea-param-screenArea)[*](*star) | — | Type: Object

The rectangular area, which is set in screen coordinates. This area is defined as an object containing information about the margins from the map edges (left, top, right, bottom) and the dimensions of the area (width, height). The values can be set as percentages of the width/height of the map container. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
accessor.setArea({
    top: 50,
    left: 50,
    width: 100,
    height: 100
});
```

[*star]: Mandatory parameter/option.