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

# hotspot.Layer

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

Hotspot layer.

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

## Constructor {#constructor-summary}

```javascript
hotspot.Layer(objectSource[, options])
```

Creates the hotspot layer. Each individual area on the layer consists of an object - [hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md).

**Parameters:**

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

Source of objects for the layer. ||
|| [`options`](#param-options) | — | Type: Object

Layer options. Options for balloons [Balloon](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Balloon.md) and hints [Hint](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Hint.md) on the hotspot layer must be indicated with the "balloon" and "hint" prefixes. ||
|| [`options.cursor`](#param-options.cursor) | 'pointer' | Type: String

Type of cursor. ||
|| [`options.dontChangeCursor`](#param-options.dontChangeCursor) | false | Type: Boolean

Option that prevents changing the cursor when pointing at an object on the layer. By default, cursors change. ||
|| [`options.hasBalloon`](#param-options.hasBalloon) | true | Type: Boolean

Flag showing whether the layer has balloons. If the flag value is "false", the ".balloon" field will not be created for the layer. ||
|| [`options.hasHint`](#param-options.hasHint) | true | Type: Boolean

Flag showing whether the layer has hints. If the flag value is "false", the ".hint" field will not be created for the layer. ||
|| [`options.interactivityModel`](#param-options.interactivityModel) | 'default#layer' | Type: String

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

Option that prevents opening the balloon when clicking on a hotspot object. By default, opening the balloon is allowed. ||
|| [`options.openEmptyBalloon`](#param-options.openEmptyBalloon) | false | Type: String

Open the balloon with empty contents. ||
|| [`options.openEmptyHint`](#param-options.openEmptyHint) | false | Type: String

Show a popup hint with empty contents. ||
|| [`options.openHintOnHover`](#param-options.openHintOnHover) | true | Type: Boolean

Option that prevents showing the hint when pointing at a hotspot object. By default, showing hints is allowed. ||
|| [`options.pane`](#param-options.pane) | 'events' | Type: [IEventPane](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventPane.md)

Container with map elements that events are listened on. ||
|| [`options.zIndex`](#param-options.zIndex) | — | Type: Number

The zIndex value of the layer. When searching for the active object on a single layer and the cursor falls on two objects simultaneously, the object with the larger zIndex value is selected. From that point on - for example, when determining which layer's shape takes priority - the zIndex value of the layer is used. Please note that the zIndex of the layer will determine the relative position of the objects on the layer, as well as single objects added to particular map panes. For example, if you want to place hotspot objects over the area objects, you should set zIndex=201 for the hotspot layer. See [map.pane.Manager](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.pane.Manager.md). ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
// Creating the source for hotspot data. We aren't setting the key value,
// so the name of the handler function (padding jsonp in the request) is generated automatically.
var objectSource = new ymaps.hotspot.ObjectSource('tiles/?%c'),
    hotspotLayer = new ymaps.hotspot.Layer(objectSource, {
        zIndex: 100,
        // Allowing the balloon to be opened without content.
        showEmptyBalloon: true
    });
```

## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [balloon](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#balloon) | [hotspot.layer.Balloon](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Balloon.md) | Hotspot layer balloon. ||
|| [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). ||
|| [hint](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#hint) | [hotspot.layer.Hint](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Hint.md) | Hotspot layer hint. ||
|| [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** ||
|| [addtomap](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#event-addtomap) | Layer added to the map. ||
|| [balloonclose](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#event-balloonclose) | Closing the balloon. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. ||
|| [balloonopen](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#event-balloonopen) | Opening the balloon on the hotspot layer. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. ||
|| [click](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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. ||
|| [hintclose](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#event-hintclose) | Closing the hint. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. ||
|| [hintopen](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#event-hintopen) | Opening the hint on the hotspot layer. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class. ||
|| [mousedown](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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). ||
|| [parentchange](https://yandex.com/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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange). ||
|| [removefrommap](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#event-removefrommap) | Layer removed from the map. ||
|| [wheel](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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** ||
|| [getMap](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#getMap)() | [Map](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map.md) | Returns reference to the map. ||
|| [getObjectInPosition](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#getObjectInPosition)([coords](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#getObjectInPosition-param-coords)) | [vow.Promise](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Allows to get the layer object in the specifed geo point at the current zoom level. The method call automatically downloads the tile which covers the point, if it is not yet downloaded. After that, the downloaded data will be used for searching. ||
|| [getObjectsInPosition](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#getObjectsInPosition)([coords](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#getObjectsInPosition-param-coords)) | [vow.Promise](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Allows to get the layer object in the specifed geo point at the current zoom level. The method call automatically downloads the tile which covers the point, if it is not yet downloaded. After that, the downloaded data will be used for searching. ||
|| [getObjectSource](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#getObjectSource)() | [IHotspotObjectSource](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IHotspotObjectSource.md) | Returns source of objects for the hotspot layer. ||
|| [getParent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#getParent)() | [IParentOnMap](https://yandex.com/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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#getParent). ||
|| [setParent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent)([parent](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent-param-parent)) | [IChildOnMap](https://yandex.com/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.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md#setParent). ||
|| [update](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.Layer.md#update)() | | Updates the hotspot layer. After this command has been executed, previously loaded objects are removed from the container and new data is requested. ||
|#

## Fields details {#field_detail}

### balloon {#balloon}

```javascript
{hotspot.layer.Balloon} balloon
```

Hotspot layer balloon.

### hint {#hint}

```javascript
{hotspot.layer.Hint} hint
```

Hotspot layer hint.

## Events details {#event_detail}

### addtomap {#addtomap}

Layer added to the map.

### balloonclose {#balloonclose}

Closing the balloon. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

### balloonopen {#balloonopen}

Opening the balloon on the hotspot layer. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

### 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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.

### hintclose {#hintclose}

Closing the hint. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

### hintopen {#hintopen}

Opening the hint on the hotspot layer. Instance of the [Event](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Event.md) class.

### 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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.

### removefrommap {#removefrommap}

Layer removed from the map.

### 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: 
- activeObject ([hotspot.layer.Object](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Object.md)) - The object of the layer 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}

# getMap {#getMap}

```javascript
{Map} getMap()
```

**Returns** reference to the map.

# getObjectInPosition {#getObjectInPosition}

```javascript
{vow.Promise} getObjectInPosition(coords)
```

Allows to get the layer object in the specifed geo point at the current zoom level. The method call automatically downloads the tile which covers the point, if it is not yet downloaded. After that, the downloaded data will be used for searching.

**Returns** the Promise object that will be resolved by the layer object covering the point. If the point falls on several layer objects, the object with the maximum zIndex will be returned.

**Parameters:**

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

The geo coordinates of the point. ||
|#

\* Mandatory parameter/option.

# getObjectsInPosition {#getObjectsInPosition}

```javascript
{vow.Promise} getObjectsInPosition(coords)
```

Allows to get the layer object in the specifed geo point at the current zoom level. The method call automatically downloads the tile which covers the point, if it is not yet downloaded. After that, the downloaded data will be used for searching.

**Returns** the Promise object that will be resolved by an array of layer objects covering the point.

**Parameters:**

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

The geo coordinates of the point. ||
|#

\* Mandatory parameter/option.

# getObjectSource {#getObjectSource}

```javascript
{IHotspotObjectSource} getObjectSource()
```

**Returns** source of objects for the hotspot layer.

**Example:**

```javascript
// Updating the data source for the hotspot layer.
hotspotLayer.getObjectSource().setTileUrlTemplate('newSource/?%c');
hotspotLayer.update();
```

# update {#update}

```javascript
{} update()
```

Updates the hotspot layer. After this command has been executed, previously loaded objects are removed from the container and new data is requested.

[*star]: Mandatory parameter/option.