Module: core

Methods

(static) applyHeightOffsetToGeometry(geometrynon-null, height)

Parameters:
Name Type Description
geometry ol.geom.Geometry
height number
Source:

(static) bottomFovRay(scenenon-null) → (non-null) {Cesium.Ray}

Compute the ray from the camera to the bottom-center of the screen.
Parameters:
Name Type Description
scene Cesium.Scene
Source:
Returns:
Type
Cesium.Ray

(static) computeAngleToZenith(scenenon-null, pivotnon-null) → {number}

Compute the rotation angle around a given point, needed to reach the zenith position. At a zenith position, the camera direction is going througth the earth center and the frustrum bottom ray is going through the chosen pivot point. The bottom-center of the screen is a good candidate for the pivot point.
Parameters:
Name Type Description
scene Cesium.Scene
pivot Cesium.Cartesian3 Point around which the camera rotates.
Source:
Returns:
Type
number

(static) computeBoundingBoxAtTarget(scenenon-null, targetnon-null, amount) → {Array.<Cesium.Cartographic>}

Compute bounding box around a target point.
Parameters:
Name Type Description
scene Cesium.Scene
target Cesium.Cartesian3
amount number Half the side of the box, in pixels.
Source:
Returns:
bottom left and top right coordinates of the box
Type
Array.<Cesium.Cartographic>

(static) computePixelSizeAtCoordinate(scenenon-null, targetnon-null) → (non-null) {Cesium.Cartesian2}

Compute the pixel width and height of a point in meters using the camera frustum.
Parameters:
Name Type Description
scene Cesium.Scene
target Cesium.Cartesian3
Source:
Returns:
the pixel size
Type
Cesium.Cartesian2

(static) computeSignedTiltAngleOnGlobe(scenenon-null) → {number|undefined}

Compute the signed tilt angle on globe, between the opposite of the camera direction and the target normal. Return undefined if there is no intersection of the camera direction with the globe.
Parameters:
Name Type Description
scene Cesium.Scene
Source:
Returns:
Type
number | undefined

(static) convertColorToCesium(olColor) → (non-null) {Cesium.Color}

Convert an OpenLayers color to Cesium.
Parameters:
Name Type Description
olColor ol.Color | CanvasGradient | CanvasPattern | string
Source:
Returns:
Type
Cesium.Color

(static) convertUrlToCesium(url) → (non-null) {olcsx.core.CesiumUrlDefinition}

Convert an OpenLayers url to Cesium.
Parameters:
Name Type Description
url string
Source:
Returns:
Type
olcsx.core.CesiumUrlDefinition

(static) extentToRectangle(extent, projection) → {Cesium.Rectangle}

Convert an OpenLayers extent to a Cesium rectangle.
Parameters:
Name Type Description
extent ol.Extent Extent.
projection ol.ProjectionLike Extent projection.
Source:
Returns:
The corresponding Cesium rectangle.
Type
Cesium.Rectangle

(static) lookAt(cameranon-null, targetnon-null, opt_globeopt)

Rotate the camera so that its direction goes through the target point. If a globe is given, the target height is first interpolated from terrain.
Parameters:
Name Type Attributes Description
camera Cesium.Camera
target Cesium.Cartographic
opt_globe Cesium.Globe <optional>
Source:

(static) normalizeView(view, angleopt)

Set the OpenLayers view to a specific rotation and the nearest resolution.
Parameters:
Name Type Attributes Description
view ol.View
angle number <optional>
Source:

(static) ol4326CoordinateArrayToCsCartesians(coordinates) → (non-null) {Array.<Cesium.Cartesian3>}

Convert an array of 2D or 3D OpenLayers coordinates to Cesium.
Parameters:
Name Type Description
coordinates Array.<!ol.Coordinate> Ol3 coordinates.
Source:
Returns:
Cesium cartesian coordinates
Type
Array.<Cesium.Cartesian3>

(static) ol4326CoordinateToCesiumCartesian(coordinate) → (non-null) {Cesium.Cartesian3}

Convert a 2D or 3D OpenLayers coordinate to Cesium.
Parameters:
Name Type Description
coordinate ol.Coordinate Ol3 coordinate.
Source:
Returns:
Cesium cartesian coordinate
Type
Cesium.Cartesian3

(static) olGeometryCloneTo4326(geometrynon-null, projectionnon-null) → (non-null) {T}

Reproject an OpenLayers geometry to EPSG:4326 if needed. The geometry will be cloned only when original projection is not EPSG:4326 and the properties will be shallow copied.
Parameters:
Name Type Description
geometry T
projection ol.ProjectionLike
Source:
Returns:
Type
T

(static) pickBottomPoint(scenenon-null) → {Cesium.Cartesian3|undefined}

Get the 3D position of the point at the bottom-center of the screen.
Parameters:
Name Type Description
scene Cesium.Scene
Source:
Returns:
Type
Cesium.Cartesian3 | undefined

(static) pickCenterPoint(scenenon-null) → {Cesium.Cartesian3|undefined}

Get the 3D position of the point at the center of the screen.
Parameters:
Name Type Description
scene Cesium.Scene
Source:
Returns:
Type
Cesium.Cartesian3 | undefined

(static) pickOnTerrainOrEllipsoid(scenenon-null, pixelnon-null) → {Cesium.Cartesian3|undefined}

Get the 3D position of the given pixel of the canvas.
Parameters:
Name Type Description
scene Cesium.Scene
pixel Cesium.Cartesian2
Source:
Returns:
Type
Cesium.Cartesian3 | undefined

(static) resetToNorthZenith(mapnon-null, scenenon-null) → {Promise.<undefined>}

Animate the return to a top-down view from the zenith. The camera is rotated to orient to the North.
Parameters:
Name Type Description
map ol.Map
scene Cesium.Scene
Source:
Returns:
Type
Promise.<undefined>

(static) rotateAroundAxis(cameranon-null, angle, axisnon-null, transformnon-null, opt_optionsopt)

Parameters:
Name Type Attributes Description
camera Cesium.Camera
angle number
axis Cesium.Cartesian3
transform Cesium.Matrix4
opt_options olcsx.core.RotateAroundAxisOption <optional>
Source:

(static) rotateAroundBottomCenter(scenenon-null, angle) → {Promise.<undefined>}

Parameters:
Name Type Description
scene Cesium.Scene
angle number in radian
Source:
Returns:
Type
Promise.<undefined>

(static) setHeadingUsingBottomCenter(scenenon-null, heading, bottomCenternon-null, opt_optionsopt)

Parameters:
Name Type Attributes Description
scene Cesium.Scene
heading number
bottomCenter Cesium.Cartesian3
opt_options olcsx.core.RotateAroundAxisOption <optional>
Source:

(static) signedAngleBetween(firstnon-null, secondnon-null, normalnon-null) → {number}

Compute the angle between two Cartesian3.
Parameters:
Name Type Description
first Cesium.Cartesian3
second Cesium.Cartesian3
normal Cesium.Cartesian3 Normal to test orientation against.
Source:
Returns:
Type
number

(static) tileLayerToImageryLayer(olLayernon-null, viewProjnullable) → (nullable) {Cesium.ImageryLayer}

Creates Cesium.ImageryLayer best corresponding to the given ol.layer.Layer. Only supports raster layers
Parameters:
Name Type Attributes Description
olLayer ol.layer.Base
viewProj ol.proj.Projection <nullable>
Projection of the view.
Source:
Returns:
null if not possible (or supported)
Type
Cesium.ImageryLayer

(static) updateCesiumLayerProperties(olLayerWithParents, csLayernon-null)

Synchronizes the layer rendering properties (opacity, visible) to the given Cesium ImageryLayer.
Parameters:
Name Type Description
olLayerWithParents olcsx.LayerWithParents
csLayer Cesium.ImageryLayer
Source: