Class OLCSCamera

Constructors

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

    Parameters

    • scene: Scene
    • map: Map

    Returns OLCSCamera

Properties

cam_: Camera
distance_: number = 0
fromLonLat_: ((input, opt_output?, opt_dimension?) => number[]) = identityProjection

Type declaration

    • (input, opt_output?, opt_dimension?): number[]
    • Parameters

      • input: number[]

        Input coordinate array.

      • Optional opt_output: number[]

        Output array of coordinate values.

      • Optional opt_dimension: number

        Dimension.

      Returns number[]

      Input coordinate array (same array as input).

lastCameraViewMatrix_: Matrix4 = null
map_: Map
scene_: Scene
tilt_: number = 0

0 -- topdown, PI/2 -- the horizon

toLonLat_: ((input, opt_output?, opt_dimension?) => number[]) = identityProjection

Type declaration

    • (input, opt_output?, opt_dimension?): number[]
    • Parameters

      • input: number[]

        Input coordinate array.

      • Optional opt_output: number[]

        Output array of coordinate values.

      • Optional opt_dimension: number

        Dimension.

      Returns number[]

      Input coordinate array (same array as input).

viewListenKey_: EventsKey = null
viewUpdateInProgress_: boolean = false

This is used to discard change events on view caused by updateView method.

view_: View

Methods

  • calculate the distance between camera and centerpoint based on the resolution and latitude value

    Parameters

    • resolution: number

      Number of map units per pixel.

    • latitude: number

      Latitude in radians.

    Returns number

    The calculated distance.

  • calculate the resolution based on a distance(camera to position) and latitude value

    Parameters

    • distance: number
    • latitude: number

    Returns number

    } The calculated resolution.

  • Check if the underlying camera state has changed and ensure synchronization.

    Parameters

    • Optional opt_dontSync: boolean

      Do not synchronize the view.

    Returns void

  • Returns Coordinate

    Same projection as the ol.View.

    Deprecated

    Shortcut for ol.View.getCenter().

    Api

  • Calculates position under the camera.

    Returns number[]

    Coordinates in same projection as the ol.View.

    Api

  • Calculates the values of the properties from the current ol.View state.

    Returns void

  • Parameters

    • center: number[]

      Same projection as the ol.View.

    Returns void

    Deprecated

    Shortcut for ol.View.setCenter().

  • Parameters

    • heading: number

      In radians.

    Returns void

    Deprecated

  • Sets the position of the camera.

    Parameters

    • position: number[]

      Same projection as the ol.View.

    Returns void

  • Private

    Parameters

    • view: View

      New view to use.

    Returns void

  • Updates the state of the underlying Cesium.Camera according to the current values of the properties.

    Returns void

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

    Returns void

Generated using TypeDoc