Module: Camera

Methods

(static) identityProjection(input, opt_outputopt, opt_dimensionopt) → {Array.<number>}

Parameters:
Name Type Attributes Description
input Array.<number> Input coordinate array.
opt_output Array.<number> <optional>
Output array of coordinate values.
opt_dimension number <optional>
Dimension.
Source:
Returns:
Input coordinate array (same array as input).
Type
Array.<number>

calcDistanceForResolution(resolution, latitude) → {number}

calculate the distance between camera and centerpoint based on the resolution and latitude value
Parameters:
Name Type Description
resolution number Number of map units per pixel.
latitude number Latitude in radians.
Source:
Returns:
The calculated distance.
Type
number

calcResolutionForDistance(distance, latitude) → {number}

calculate the resolution based on a distance(camera to position) and latitude value
Parameters:
Name Type Description
distance number
latitude number
Source:
Returns:
The calculated resolution.
Type
number

checkCameraChange(opt_dontSyncopt)

Check if the underlying camera state has changed and ensure synchronization.
Parameters:
Name Type Attributes Description
opt_dontSync boolean <optional>
Do not synchronize the view.
Source:

getAltitude() → {number}

Source:
Returns:
Altitude in meters.
Type
number

getCenter() → {ol.Coordinate|undefined}

Shortcut for ol.View.getCenter().
Source:
Returns:
Same projection as the ol.View.
Type
ol.Coordinate | undefined

getDistance() → {number}

Source:
Returns:
Distance in meters.
Type
number

getHeading() → {number|undefined}

Source:
Returns:
Heading in radians.
Type
number | undefined

getPosition() → {ol.Coordinate|undefined}

Calculates position under the camera.
Source:
Returns:
Same projection as the ol.View.
Type
ol.Coordinate | undefined

getTilt() → {number}

Source:
Returns:
Tilt in radians.
Type
number

lookAt(positionnon-null)

Rotates the camera to point at the specified target.
Parameters:
Name Type Description
position ol.Coordinate Same projection as the ol.View.
Source:

readFromView()

Calculates the values of the properties from the current ol.View state.
Source:

setAltitude(altitude)

Parameters:
Name Type Description
altitude number In meters.
Source:

setCenter(centernon-null)

Shortcut for ol.View.setCenter().
Parameters:
Name Type Description
center ol.Coordinate Same projection as the ol.View.
Source:

setDistance(distance)

Parameters:
Name Type Description
distance number In meters.
Source:

setHeading(heading)

Parameters:
Name Type Description
heading number In radians.
Source:

setPosition(positionnon-null)

Sets the position of the camera.
Parameters:
Name Type Description
position ol.Coordinate Same projection as the ol.View.
Source:

setTilt(tilt)

Parameters:
Name Type Description
tilt number In radians.
Source:

updateView()

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