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

# Hint

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

A hint is a popup text that can display any HTML content. There is usually just one hint instance on the map and it is managed via special managers ([maps](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/map.Hint.md), [geo objects](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/geoObject.Hint.md), [hotspot layers](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/hotspot.layer.Hint.md) and so on). Don't create them yourself, unless truly necessary.

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

## Constructor {#constructor-summary}

```javascript
Hint(map[, options])
```

**Parameters:**

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

Reference to a map object. ||
|| [`options`](#param-options) | — | Type: Object

Options. ||
|| [`options.closeTimeout`](#param-options.closeTimeout) | 700 | Type: Number

Delay before closing (in ms). ||
|| [`options.contentLayout`](#param-options.contentLayout) | — | Type: Function\|String

Layout for hint content. (Type: constructor for an object with the ILayout interface). ||
|| [`options.fitPane`](#param-options.fitPane) | true | Type: Boolean

Flag that forces the info object to move its position so that it doesn't extend beyond the container boundaries. ||
|| [`options.holdByMouse`](#param-options.holdByMouse) | true | Type: Boolean

Flag that cancels closing a hint that is located under the cursor. ||
|| [`options.interactivityModel`](#param-options.interactivityModel) | — | Type: String

Key for the interactivity model. Available keys and their values are listed in the description of [interactivityModel.storage](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/interactivityModel.storage.md). ||
|| [`options.layout`](#param-options.layout) | islands#hint | Type: Function\|String

External layout for the hint. (Type: constructor for an object with the ILayout interface). ||
|| [`options.offset`](#param-options.offset) | — | Type: Number[]

Additional position offset relative to the anchor point. ||
|| [`options.openTimeout`](#param-options.openTimeout) | 150 | Type: Number

Delay before opening (in ms). ||
|| [`options.pane`](#param-options.pane) | 'outerHint' | Type: String

Key of the pane that the hint overlay is placed in. ||
|| [`options.zIndex`](#param-options.zIndex) | — | Type: String

The z-index of the hint. ||
|#

\* Mandatory parameter/option.

**Example:**

```javascript
// Creating an independent hint instance and showing it with a custom layout in the center of the map by setting the geo coordinates.
(new ymaps.Hint(myMap, {
    projection: ymaps.projection.wgs84Mercator,
    layout: ymaps.templateLayoutFactory.createClass('{{} content }}')
})).open(myMap.getCenter(), 'Hello');
```

## Fields {#properties-summary}

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

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

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

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [close](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#event-close) | Closing the info object.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#event-close). ||
|| [open](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#event-open) | Opening the info object.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#event-open). ||
|| [optionschange](https://yandex.com.tr/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.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange). ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [close](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#close)(\[[force](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#close-param-force)]) | [vow.Promise](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Closes the info object.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#close). ||
|| [getData](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getData)() | | Returns info object data.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getData). ||
|| [getOverlay](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getOverlay)() | [vow.Promise](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Returns the promise object to return the overlay.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getOverlay). ||
|| [getOverlaySync](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getOverlaySync)() | [IOverlay](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOverlay.md) | Returns the overlay, if one exists.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getOverlaySync). ||
|| [getPosition](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getPosition)() | | Returns the coordinates of the info object.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#getPosition). ||
|| [isOpen](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#isOpen)() | Boolean | Returns the info object state: open/closed.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#isOpen). ||
|| [open](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#open)(\[[position](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#open-param-position)[, [data](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#open-param-data)]]) | [vow.Promise](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Opens the info object at the specified position. If the info object is already open, it moves it to the specified point. The format and content of the coordinates is determined by the [IProjection](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IProjection.md) that is in the options.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#open). ||
|| [setData](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#setData)([data](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#setData-param-data)) | [vow.Promise](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Defines new data for the info object.

Inherited from [IPopup](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#setData). ||
|| [setPosition](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#setPosition)([position](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPopup.md#setPosition-param-position)) | [vow.Promise](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Specifies a new position for the info object.

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


[*star]: Mandatory parameter/option.