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

# objectManager.OverlayCollection

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

Collection of overlays.

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

## Constructor {#constructor-summary}

```javascript
objectManager.OverlayCollection()
```

## Fields {#properties-summary}

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

Inherited from [IEventEmitter](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|| [options](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#options) | [IOptionManager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOptionManager.md) | Options manager.

Inherited from [ICustomizable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#options). ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [add](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#event-add) | Adds an overlay to the collection. Instance of the [Event](https://yandex.com/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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - The added overlay. ||
|| [click](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [contextmenu](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [dblclick](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [mousedown](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [mouseenter](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [mouseleave](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [mousemove](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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 Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [mouseup](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [multitouchend](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#event-multitouchend) | End of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Names of fields that are available via the IMultiTouchEvent#get method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [multitouchmove](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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. Names of fields that are available via the IMultiTouchEvent#get method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [multitouchstart](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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. Names of fields that are available via the IMultiTouchEvent#get method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|| [optionschange](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange) | Change to the object options.

Inherited from [ICustomizable](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange). ||
|| [remove](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#event-remove) | Removes an overlay from the collection. Instance of the [Event](https://yandex.com/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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - The deleted overlay. ||
|| [wheel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one. ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [each](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#each)([callback](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#each-param-callback), [context](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#each-param-context)) | | ||
|| [getAll](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#getAll)() | Object[] | Returns array of objects contained in the collection. ||
|| [getById](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#getById)([id](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#getById-param-id)) | Object\|null | Returns overlay, or null if an overlay with the passed ID does not exist. ||
|| [getId](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#getId)([overlay](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#getId-param-overlay)) | Number\|null | Returns the object ID, or null if the overlay is not contained in the collection. ||
|| [getIterator](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#getIterator)() | [IIterator](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IIterator.md) | Returns iterator for the collection. ||
|| [getLength](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/objectManager.OverlayCollection.md#getLength)() | Number | Returns the number of objects in the collection. ||
|#

## Events details {#event_detail}

### add {#add}

Adds an overlay to the collection. Instance of the [Event](https://yandex.com/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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - The added overlay.

### click {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### contextmenu {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### dblclick {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### mousedown {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### mouseenter {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### mouseleave {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### mousemove {#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 Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### mouseup {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### multitouchend {#multitouchend}

End of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Names of fields that are available via the IMultiTouchEvent#get method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### multitouchmove {#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. Names of fields that are available via the IMultiTouchEvent#get method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### multitouchstart {#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. Names of fields that are available via the IMultiTouchEvent#get method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

### remove {#remove}

Removes an overlay from the collection. Instance of the [Event](https://yandex.com/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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - The deleted overlay.

### wheel {#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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/MapEvent.md) class. More information is available in [domEvent.manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/domEvent.manager.md). Instance of the Event class. Names of fields that are available via the [Event.get](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md#get) method: 
- objectId - The ID of the object the overlay belongs to.
- overlay - IOverlay - The overlay where the event occurred.
- coords - Geographical coordinates of the point at which the event occurred.
- globalPixels - Coordinates of the event in global pixels from the upper-left corner of the world.
- pagePixels - Coordinates of the event in pixels from the upper-left corner of the page.
- clientPixels - Coordinates of the event in pixels from the upper-left corner of the browser window.
- domEvent - Source DOM event (as a [DomEvent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/DomEvent.md) object), if there is one.

## Methods details {#method_detail}

### each {#each}

```javascript
{} each(callback, context)
```

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`callback`](#each-param-callback)[*](*star) | — | Type: Function

Callback function that the collection objects are passed to. ||
|| [`context`](#each-param-context)[*](*star) | — | Type: Object

Context for the callback. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
objectManager.clusters.overlays.each(function (overlay) {
    overlay.options.set('cursor', 'help');
});
```

### getAll {#getAll}

```javascript
{Object[]} getAll()
```

**Returns** array of objects contained in the collection.

**Example:**

```javascript
var clusterOverlayArray = objectManager.clusters.overlays.getAll();
```

### getById {#getById}

```javascript
{Object|null} getById(id)
```

**Returns** overlay, or null if an overlay with the passed ID does not exist.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`id`](#getById-param-id)[*](*star) | — | Type: Number

ID of the object the overlay belongs to. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
objectManager.objects.add('mouseenter', function (e) {
    var objectId = e.get('objectId');
    var overlay = objectManager.objects.overlays.getById(objectId);
    overlay.options.set('zIndex', 100);
});
```

### getId {#getId}

```javascript
{Number|null} getId(overlay)
```

**Returns** the object ID, or null if the overlay is not contained in the collection.

**Parameters:**

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

Overlay. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
objectManager.objects.overlays.each(function (overlay) {
    var objectId = objectManager.objects.overlays.getId(overlay);
    objectManager.objects.setObjectOptions(objectId, {
        preset: 'islands#redIcon'
    });
});
```

### getIterator {#getIterator}

```javascript
{IIterator} getIterator()
```

**Returns** iterator for the collection.

**Example:**

```javascript
var it = objectManager.objects.overlays.getIterator();
var overlay;
while ((overlay = it.getNext()) != it.STOP_ITERATION) {
    overlay.options.set('zIndex', 10);
}
```

### getLength {#getLength}

```javascript
{Number} getLength()
```

**Returns** the number of objects in the collection.

**Example:**

```javascript
var objectsNumber = objectManager.objects.getLength(),
    overlaysNumber = objectManager.objects.overlays.getNumber();
alert('Now the map shows ' + overlaysNumber + ' of ' + objectsNumber);
```

[*star]: Mandatory parameter/option.