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

# map.ZoomRange

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

Map zoom level manager. Each map already has its own zoom level manager, available as map.zoomRange. Don't instantiate new instances of this class unless necessary.

**See** [Map.zoomRange](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map.md#zoomRange)

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

## Constructor {#constructor-summary}

```javascript
map.ZoomRange(map, constraints)
```

**Parameters:**

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

Map. ||
|| [`constraints`](#param-constraints)[*](*star) | — | Type: Number[]

An array containing the minimum and maximum map zooms. ||
|#

\* Mandatory parameter/option.

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [events](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events) | [IEventManager](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventManager.md) | Event manager.

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

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [change](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.ZoomRange.md#event-change) | Changes occurred in the map zoom range. ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [get](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.ZoomRange.md#get)([[coords](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.ZoomRange.md#get-param-coords)]) | [vow.Promise](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Checks the available range of zoom levels at the specified point. ||
|| [getCurrent](https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.ZoomRange.md#getCurrent)() | Number[] | Returns the current (last received) values of the minimum and maximum map zoom levels. ||
|#

## Events details {#event_detail}

### change {#change}

Changes occurred in the map zoom range.

## Methods details {#method_detail}

### get {#get}

```javascript
{vow.Promise} get([coords])
```

Checks the available range of zoom levels at the specified point.

**Returns** a Promise object, which will be resolved and will get an array of two numbers as a parameter - the maximum and minimum zoom at the given point.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`coords`](#get-param-coords) | — | Type: Number[]

Coordinates of a point. If omitted, the current map center is used. ||
|#


**Example:**

```javascript
// Finding the coordinates of the Yandex office and showing it on the map
// at the maximum possible zoom level.
ymaps.geocode('Moscow, Lev Tolstoy street, 16').then(function (res) {
    var coords = res.geoObjects.get(0).geometry.getCoordinates();
    map.zoomRange.get(coords).then(function (range) {
        map.setCenter(coords, range[1]);
    });
});
```

### getCurrent {#getCurrent}

```javascript
{Number[]} getCurrent()
```

**Returns** the current (last received) values of the minimum and maximum map zoom levels.

[*star]: Mandatory parameter/option.