Class: Viewer

bu.street.Viewer

Constructor for bu.street.Viewer class This is an abstract class for viewers that show 360ยบ panorama images. It is used for creating subclasses and not instantiated in apps. Note that with bu.street.Viewer and all its subclasses, any property set in the options is set as a ol.Object property on the viewer object, so is observable, and has get/set accessors.

Constructor

(abstract) new Viewer(options)

Parameters:
Name Type Description
options bu.street.ViewerOptions

Viewer options.

Source:

Extends

Members

(inner) properties :Object.<string, *>

Type:
  • Object.<string, *>
Source:

Methods

(abstract) clone() → {bu.Viewer}

Clones this viewer reinitializing the new one with main values of current one. This is an abstract method that must be implemented in derived classes.

Inherited From:
Source:
Returns:

The viewer cloned.

Type
bu.Viewer

disposeInternal()

Inherited From:
Source:

getCenter() → {bu.Coordinate}

Return the current center of the viewer. This center is the point where the 360 image is shot. Coordinates are always in WGS84 latlon, first value in the coordinate is longitude and second latitude.

Source:
Returns:

The viewer center.

Type
bu.Coordinate

getFOV() → {number}

Return the current FOV of the viewer in decimal degrees. FOV or Field of View is the angle of the 360 image that is currently visible in the viewer. It depends on the size of the viewer and the angular resolution of the current zoom level. Changing this value causes the same effect of changing zoom level but this value gives more grain control. Value range is [0,360) though values up 180 aren't logical ones in a 2D screen. The projection in a 2D screen is limited to values far under 180. Values above 180 have sense, on the contrary, for VR screens.

Source:
Returns:

The viewer FOV.

Type
number

getImage() → {bu.street.Image}

Return the BlomURBEX 360 image currently shown. It return null if no image is currently loaded.

Source:
Returns:

The image.

Type
bu.street.Image

getImageID() → {string}

Return the image ID of the BlomURBEX 360 image to be shown.

Source:
Returns:

The image ID.

Type
string

getPitch() → {number}

Returns current pitch value of the viewer and [-Pi/2, Pi/2] is the expected values range.

Source:
Returns:
Type
number

getRotation() → {bu.Coordinate}

Return the current rotation of the viewer in decimal degrees with north equal zero and values increasing towards east. Value range is [0,360).

Source:
Returns:

The viewer rotation.

Type
bu.Coordinate

getTarget() → {Element|string|undefined}

Get the target in which the viewer is rendered. Note that this returns what is entered as an option or in setTarget: if that was an element, it returns an element; if a string, it returns that.

Inherited From:
Source:
Returns:

The Element or id of the Element that the viewer is rendered in.

Type
Element | string | undefined

getTargetElement() → {Element}

Get the DOM element into which this viewer is rendered. In contrast to getTarget this method always return an Element, or null if the viewer has no target.

Inherited From:
Source:
Returns:

The element that the viewer is rendered in.

Type
Element

getUsertoken() → {string}

Return the usertoken to be used with BlomURBEX services.

Source:
Returns:

The usertoken.

Type
string

getViewType() → {bu.ViewType}

Return the type of the viewer.

Inherited From:
Source:
Returns:

The viewer type.

Type
bu.ViewType

getYaw() → {number}

Returns current yaw value of the viewer and [-Pi, Pi] is the expected values range.

Source:
Returns:

Yaw - The yaw value of the viewer. Range is [-Pi, Pi].

Type
number

setFOV(fov)

Set the current FOV of the viewer in decimal degrees. FOV or Field of View is the angle of the 360 image that is currently visible in the viewer. It depends on the size of the viewer and the angular resolution of the current zoom level. Changing this value causes the same effect of changing zoom level but this value gives more grain control. Value range is [0,360) though values up 180 aren't logical ones in a 2D screen. The projection in a 2D screen is limited to values far under 180. Values above 180 have sense, on the contrary, for VR screens.

Parameters:
Name Type Description
fov number

The viewer FOV.

Source:

setImage(image)

Set the BlomSTREET 360? panorama image to be shown.

Parameters:
Name Type Description
image bu.street.Image

The image.

Source:

setImageID(imageid)

Set the image ID of the BlomURBEX 360 image to be shown.

Parameters:
Name Type Description
imageid string

The image ID.

Source:

setPitch(pitch)

Valid range is (-Pi/2, Pi/2). Set the current PITCH value of the viewer in radians. Valid range is [-Pi, Pi]. When yaw value is 0 the viewer is aligned with horizont, -Pi value is the highest angle we can focus of the image and Pi is the lower.

Parameters:
Name Type Description
pitch number

The PITCH value

Source:

setRotation(rotation)

SZet the current rotation of the viewer in decimal degrees with north equal zero and values increasing towards east. Value range is [0,360).

Parameters:
Name Type Description
rotation bu.Coordinate

The viewer rotation.

Source:

setTarget(target)

Set the target element to render this viewer into.

Parameters:
Name Type Description
target Element | string | undefined

The Element or id of the Element that the viewer is rendered in.

Inherited From:
Source:

setUsertoken(usertoken)

Set the usertoken to be used with BlomURBEX services.

Parameters:
Name Type Description
usertoken string

The usertoken.

Source:

setYaw(yaw)

Set the current YAW value of the viewer in radians. Valid range is [-Pi, Pi] When yaw value is 0 the viewer is aligned with the yaw of the shots taking vehicle.

Parameters:
Name Type Description
yaw number

The viewer YAW.

Source: