panorama.Base.createPanorama
Static function.
Returns panorama instance.
{ IPanorama } panorama.Base.createPanorama(params)
Parameters:
Parameter |
Default value |
Description |
— |
Type: Object Panorama parameters. |
|
— |
Type: Number[] Angular |
|
— |
Type: ICoordSystem Coordinate system that the panorama position is set in. By default, it uses coordSystem.geo. |
|
'' |
Type: String Name of the panorama. |
|
— |
Type: Number[] The position of the panorama. |
|
— |
Type: IPanoramaTileLevel[] Array of panorama image detail levels. |
|
— |
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];
}
}]
})
);
Mandatory parameter/option.