Documentation
Reference
2.1.53 (current version)
collection
interactivityModel
Interfaces

panorama.Base.createPanorama

Static function.

Returns panorama instance.

{ IPanorama } panorama.Base.createPanorama(params)

Parameters:

ParameterDefault valueDescription
params*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Object

Panorama parameters.

params.angularBBox*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

Angular

params.coordSystem

Type: ICoordSystem

Coordinate system that the panorama position is set in. By default, it uses coordSystem.geo.

params.name ''

Type: String

Name of the panorama.

params.position*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

The position of the panorama.

params.tileLevels*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: IPanoramaTileLevel[]

Array of panorama image detail levels.

params.tileSize*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

Size of the panorama image tiles.

* Mandatory parameter/option.

Example:

var player = new ymaps.panorama.Player(
    'player',
    ymaps.panorama.Base.createPanorama({
        coordSystem: ymaps.coordSystem.cartesian,
        // Let's put our panorama in the center of the coordinate system.
        position: [0, 0],
        name: 'My panorama',
        // We'll make our panorama fully spherical.
        angularBBox: [0.5 * Math.PI, 2 * Math.PI, -0.5 * Math.PI, 0],
        tileSize: [512, 512],
        tileLevels: [{
            getTileUrl: function (x, y) {
                return '/' + x + '/' + y + '.jpg';
           },

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