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

# Panorama

{% note info %}

The constructor of the Panorama class is hidden, as this class is not intended for autonomous initialization.

{% endnote %}

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

Object describing the panorama.

**See** [panorama.locate](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.locate.md)

[Methods](#methods-summary)

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [createPlayer](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Panorama.md#createPlayer)([element](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Panorama.md#createPlayer-param-element)[, [options](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Panorama.md#createPlayer-param-options)]) | [vow.Promise](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/vow.Promise.md) | Creates a new instance of the [panorama.Player](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Player.md) class and opens the panorama in it. ||
|| [getAngularBBox](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getAngularBBox)() | Number[] | Returns spherical coordinates that define the area covered by the image on the panoramic sphere. Coordinates are specified in the format `[thetaTop, phiRight, thetaBottom, phiLeft]` (the same as CSS).

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getAngularBBox). ||
|| [getConnectionArrows](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getConnectionArrows)() | [IPanoramaConnectionArrow](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaConnectionArrow.md)[] | Returns array of connection arrows on the panorama.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getConnectionArrows). ||
|| [getConnectionMarkers](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getConnectionMarkers)() | [IPanoramaConnectionMarker](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaConnectionMarker.md)[] | Returns array of connection markers on the panorama.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getConnectionMarkers). ||
|| [getCoordSystem](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getCoordSystem)() | [ICoordSystem](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICoordSystem.md) | Returns the coordinate system that is used for defining positions of the panorama and all the associated markers and connections.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getCoordSystem). ||
|| [getDefaultDirection](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getDefaultDirection)() | Number[] | Returns default direction of view. It will be used by the player when opening the panorama.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getDefaultDirection). ||
|| [getDefaultSpan](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getDefaultSpan)() | Number[] | Returns default size of the viewing area. It will be used by the player when opening the panorama.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getDefaultSpan). ||
|| [getGraph](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getGraph)() | [IPanoramaGraph](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaGraph.md)\|null | Returns the graph of panoramas connected to the current panorama for making quick transitions.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getGraph). ||
|| [getLayer](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Panorama.md#getLayer)() | String | Returns the layer the panorama belongs to. ||
|| [getMarkers](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getMarkers)() | [IPanoramaMarker](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaMarker.md)[] | Returns array of markers on the panorama.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getMarkers). ||
|| [getName](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getName)() | String | Returns the name of the panorama displayed by the player in the interface.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getName). ||
|| [getPosition](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getPosition)() | Number[] | Returns the location of the panorama in the coordinate system set in the options. Set in the format `[lon, lat, height]`, `[lat, lon, height]` or `[x, y, height]` depending on the coordinate system and order. `height` – the height of the panorama in meters, relative to some level (not necessarily sea level).

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getPosition). ||
|| [getTileLevels](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getTileLevels)() | [IPanoramaTileLevel](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaTileLevel.md)[] | Returns array of zoom levels for the panorama image.

Inherited from [IPanorama](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getTileLevels). ||
|| [getTileSize](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanorama.md#getTileSize)() | Number[] | Returns the size of tiles that the panorama image is divided into.

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

## Methods details {#method_detail}

### createPlayer {#createPlayer}

```javascript
{vow.Promise} createPlayer(element[, options])
```

Creates a new instance of the [panorama.Player](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Player.md) class and opens the panorama in it.

**Returns** a promise object that will be resolved by the instance of the class [panorama.Player](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Player.md) with the current panorama open.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`element`](#createPlayer-param-element)[*](*star) | — | Type: HTMLElement\|String

A reference to the HTML element that will contain the player, or the ID of this HTML element. ||
|| [`options`](#createPlayer-param-options) | — | Type: Object

Options. ||
|| [`options.direction`](#createPlayer-param-options.direction) | 'auto' | Type: Number[]\|String

Direction of view in the format `[bearing, pitch]`, where `bearing` – is the azimuth of the direction in degrees, `pitch` – angle of elevation above the horizon in degrees. A special string value `auto` means that after opening of the panorama, the direction specified in the panorama's metadata will be applied. ||
|| [`options.span`](#createPlayer-param-options.span) | 'auto' | Type: Number[]\|String

The angular dimensions of the field of view in the format `[horizontalSpan, verticalSpan]`, where `horizontalSpan` – the horizontal field size, `verticalSpan` – the vertical field size. ||
|#

\* Mandatory parameter/option.

### getLayer {#getLayer}

```javascript
{String} getLayer()
```

**See** [panorama.locate](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.locate.md)

**Returns** the layer the panorama belongs to.

[*star]: Mandatory parameter/option.