Panorama

Note

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

Extends IPanorama.

Object describing the panorama.

See panorama.locate

Methods

Methods

Name

Returns

Description

createPlayer(element[, options])

vow.Promise

Creates a new instance of the panorama.Player class and opens the panorama in it.

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.

getConnectionArrows()

IPanoramaConnectionArrow[]

Returns array of connection arrows on the panorama.

Inherited from IPanorama.

getConnectionMarkers()

IPanoramaConnectionMarker[]

Returns array of connection markers on the panorama.

Inherited from IPanorama.

getCoordSystem()

ICoordSystem

Returns the coordinate system that is used for defining positions of the panorama and all the associated markers and connections.

Inherited from IPanorama.

getDefaultDirection()

Number[]

Returns default direction of view. It will be used by the player when opening the panorama.

Inherited from IPanorama.

getDefaultSpan()

Number[]

Returns default size of the viewing area. It will be used by the player when opening the panorama.

Inherited from IPanorama.

getGraph()

IPanoramaGraph|null

Returns the graph of panoramas connected to the current panorama for making quick transitions.

Inherited from IPanorama.

getLayer()

String

Returns the layer the panorama belongs to.

getMarkers()

IPanoramaMarker[]

Returns array of markers on the panorama.

Inherited from IPanorama.

getName()

String

Returns the name of the panorama displayed by the player in the interface.

Inherited from IPanorama.

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.

getTileLevels()

IPanoramaTileLevel[]

Returns array of zoom levels for the panorama image.

Inherited from IPanorama.

getTileSize()

Number[]

Returns the size of tiles that the panorama image is divided into.

Inherited from IPanorama.

Methods details

createPlayer

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

Creates a new instance of the panorama.Player class and opens the panorama in it.

Returns a promise object that will be resolved by the instance of the class panorama.Player with the current panorama open.

Parameters:

Parameter

Default value

Description

element*

Type: HTMLElement|String

A reference to the HTML element that will contain the player, or the ID of this HTML element.

options

Type: Object

Options.

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

'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

{String} getLayer()

See panorama.locate

Returns the layer the panorama belongs to.