Class: Camera

Camera

new olcs.Camera(scene, map) experimental

This object takes care of additional 3d-specific properties of the view and ensures proper synchronization with the underlying raw Cesium.Camera object.

Name Type Description
scene Cesium.Scene
map ol.Map

Methods

getAltitude(){number} experimental

Returns:
Altitude in meters.

getCenter(){ol.Coordinate|undefined} experimental

Shortcut for ol.View.getCenter().

Returns:
Same projection as the ol.View.

getDistance(){number} experimental

Returns:
Distance in meters.

getHeading(){number|undefined} experimental

Returns:
Heading in radians.

getPosition(){ol.Coordinate|undefined} experimental

Calculates position under the camera.

Returns:
Same projection as the ol.View.

getTilt(){number} experimental

Returns:
Tilt in radians.

lookAt(position) experimental

Rotates the camera to point at the specified target.

Name Type Description
position ol.Coordinate

Same projection as the ol.View.

setAltitude(altitude) experimental

Name Type Description
altitude number

In meters.

setCenter(center) experimental

Shortcut for ol.View.setCenter().

Name Type Description
center ol.Coordinate

Same projection as the ol.View.

setDistance(distance) experimental

Name Type Description
distance number

In meters.

setHeading(heading) experimental

Name Type Description
heading number

In radians.

setPosition(position) experimental

Sets the position of the camera.

Name Type Description
position ol.Coordinate

Same projection as the ol.View.

setTilt(tilt) experimental

Name Type Description
tilt number

In radians.

updateView() experimental

Calculates the values of the properties from the current Cesium.Camera state. Modifies the center, resolution and rotation properties of the view.