---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.2
alternate:
  - https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md
  - https://yandex.com/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/panorama.Base.md
  - href: https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com/dev/jsapi-v2-1/doc/en/llms.txt?revision=r21950234
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/jsapi-v2-1/doc/en/llms.txt?revision=r21950234

# panorama.Base

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

[Constructor](#constructor-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
panorama.Base()
```

Initializes the panorama with default parameters.

**Example:**

```javascript
function Panorama () {
    ymaps.panorama.Base.call(this);
    // Making sure that everything is all right with our panorama.
    this.validate();
}

ymaps.util.defineClass(Panorama, ymaps.panorama.Base, {
    getPosition: function () {
        // Let's put our panorama at the center of the coordinate system.
        return [0, 0, 0];
    },

    getCoordSystem: function () {
        return ymaps.coordSystem.cartesian;
    },

    getAngularBBox: function () {
        // We'll make our panorama fully spherical.
        return [0.5 * Math.PI, 2 * Math.PI, -0.5 * Math.PI, 0];
    },

    getTileSize: function () {
        return [512, 512];
    },

    getTileLevels: function () {
        // Our panorama will have just one image.
        return [{
            getTileUrl: function (x, y) {
                return '/' + x + '/' + y + '.jpg';
            },

            getImageSize: function () {
                return [4096, 2048];
            }
        }];
    }
});
```

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [getAngularBBox](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getAngularBBox)() | | Overriding this method is required. ||
|| [getConnectionArrows](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getConnectionArrows)() | [IPanoramaConnectionArrow](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaConnectionArrow.md)[] | Returns an empty array, as if the panorama doesn't have any connection arrows. ||
|| [getConnectionMarkers](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getConnectionMarkers)() | [IPanoramaConnectionMarker](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaConnectionMarker.md)[] | Returns an empty array, as if the panorama doesn't have any connection markers. ||
|| [getConnections](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getConnections)() | [IPanoramaConnectionMarker](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaConnectionMarker.md)[] |

{% note alert %}

This method is deprecated.

{% endnote %}


This method is **deprecated**. Override panorama.Base.getConnectionMarkers. ||
|| [getCoordSystem](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getCoordSystem)() | [ICoordSystem](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICoordSystem.md) | Returns the geographical coordinate system. ||
|| [getDefaultDirection](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getDefaultDirection)() | Number[] | Returns the direction of "north" to the horizon. ||
|| [getDefaultSpan](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getDefaultSpan)() | Number[] | Returns the field of view is 130 by 80 degrees in radians. ||
|| [getGraph](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getGraph)() | null | Returns `null`, as if there aren't any quick transitions for the panorama graph. ||
|| [getMarkers](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getMarkers)() | [IPanoramaMarker](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaMarker.md)[] | Returns an empty array, as if the panorama doesn't have any markers. ||
|| [getName](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getName)() | String | Returns empty string. ||
|| [getPosition](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getPosition)() | Overriding this method is required. ||
|| [getThoroughfares](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getThoroughfares)() | [IPanoramaConnectionArrow](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IPanoramaConnectionArrow.md)[] | 
{% note warning %}

This method is deprecated.

{% endnote %}


This method is **deprecated**. Override panorama.Base.getConnectionArrows. ||
|| [getTileLevels](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getTileLevels)() | | Overriding this method is required. ||
|| [getTileSize](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#getTileSize)() | | Overriding this method is required. ||
|| [validate](https://yandex.com/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/panorama.Base.md#validate)() | | Checks the consistency and validity of data returned by methods of the panorama object. Conditions that this method verifies: 
- positions of all objects have three components (including height);
- the tile size must be a power of two (for example, 128, 256, or 512 pixels);
- the panorama is a full circle (i.e. the width of the angular area must be 2π);
- each zoom level for the panorama image contains an integral number of tiles horizontally (this isn't required vertically).
If calling this method generates an error for the panorama object, we cannot guarantee the stability of the panorama player with this panorama.||
|#

## Methods details {#method_detail}

### getAngularBBox {#getAngularBBox}

```javascript
{} getAngularBBox()
```

Overriding this method is required.

### getConnectionArrows {#getConnectionArrows}

```javascript
{IPanoramaConnectionArrow[]} getConnectionArrows()
```

**Returns** an empty array, as if the panorama doesn't have any connection arrows.

### getConnectionMarkers {#getConnectionMarkers}

```javascript
{IPanoramaConnectionMarker[]} getConnectionMarkers()
```

**Returns** an empty array, as if the panorama doesn't have any connection markers.

### getConnections {#getConnections}

```javascript
{IPanoramaConnectionMarker[]} getConnections()
```

This method is **deprecated**. Override panorama.Base.getConnectionMarkers.

**This method is deprecated. **

**Returns** an empty array, as if the panorama doesn't have any connections.

### getCoordSystem {#getCoordSystem}

```javascript
{ICoordSystem} getCoordSystem()
```

**Returns** the geographical coordinate system.

### getDefaultDirection {#getDefaultDirection}

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

**Returns** the direction of "north" to the horizon.

### getDefaultSpan {#getDefaultSpan}

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

**Returns** the field of view is 130 by 80 degrees in radians.

### getGraph {#getGraph}

```javascript
{null} getGraph()
```

**Returns**`null`, as if there aren't any quick transitions for the panorama graph.

### getMarkers {#getMarkers}

```javascript
{IPanoramaMarker[]} getMarkers()
```

**Returns** an empty array, as if the panorama doesn't have any markers.

### getName {#getName}

```javascript
{String} getName()
```

**Returns** empty string.

### getPosition {#getPosition}

```javascript
{} getPosition()
```

Overriding this method is required.

### getThoroughfares {#getThoroughfares}

```javascript
{IPanoramaConnectionArrow[]} getThoroughfares()
```

This method is **deprecated**. Override panorama.Base.getConnectionArrows.

**This method is deprecated. **

**Returns** an empty array, as if the panorama doesn't have any transitions.

### getTileLevels {#getTileLevels}

```javascript
{} getTileLevels()
```

Overriding this method is required.

### getTileSize {#getTileSize}

```javascript
{} getTileSize()
```

Overriding this method is required.

### validate {#validate}

```javascript
{} validate()
```

Checks the consistency and validity of data returned by methods of the panorama object. Conditions that this method verifies: 
- positions of all objects have three components (including height);
- the tile size must be a power of two (for example, 128, 256, or 512 pixels);
- the panorama is a full circle (i.e. the width of the angular area must be 2π);
- each zoom level for the panorama image contains an integral number of tiles horizontally (this isn't required vertically).
If calling this method generates an error for the panorama object, we cannot guarantee the stability of the panorama player with this panorama.
