Class: Cesium

vcs.vcm.maps.Cesium

Cesium Globe Map Class (3D map)

new vcs.vcm.maps.Cesium(options)

Name Type Description
options vcs.vcm.maps.Cesium.Options
Fires:
  • CLICKED_FIRST_HIT (vcs.vcm.maps.Cesium) - vcs.vcm.event.EventType.CLICKED_FIRST_HIT is triggered when the globe is clicked, is always called before vcs.vcm.maps#event:MAP_CLICKED and FEATURE_CLICKED. The clicked position in WGS84 coordinates as longitude, latitude, height and groundLevel properties. The clicked position is the first found intersection, either the clicked point incl. height on a 3d object or the point on the map. In the map case height and groundLevel will be the same.

Extends

Members

className{string}

class Name of the Object

debugMode{boolean}

Whether the debug mode is active or not

globeColor{Cesium.Color}

limitCameraHeight{number} {null}

can be used to limit the height of the camera, 0 is no limit

mapElement{HTMLElement}

movementDisabled{boolean}

if true, no movements should occur

name{string}

unique Name

Methods

activate(viewPoint){Promise}

activates the map, and jumps to the given viewpoint This method should trigger the EVENT MAP_ACTIVATED after successfull activation.

Name Type Description
viewPoint vcs.vcm.util.ViewPoint

the optional starting Viewpoint of the map after activation.

Fires:
  • MAP_ACTIVATED (vcs.vcm.maps) - vcs.vcm.event.EventType.MAP_ACTIVATED is triggered when a map is activated (and on each map switch).

activateMouseClickEvents(activate) inherited

activates mouseClick Events on objects

Name Type Description
activate boolean
Deprecated
  • 3.5

    deactivate(){Promise} inherited

    deactivates the map returns the current viewpoint of the map to enable a change between different maps.

    Returns:
    position returns the current viewpoint of the map.

    dispose() inherited

    disposes the map

    getActiveMouseClickEvents(){boolean} inherited

    returns whether mouse click events is activated or not

    Deprecated
    • 3.5

      getCesiumWidget(){Cesium.CesiumWidget}

      returns the cesium Widget Object

      getClassName(){string} inherited

      returns the class name of this object.

      Deprecated
      • Yes
      Returns:
      className

      getClusterDatasources(){Cesium.DataSourceCollection}

      Returns the cluster dataSourceDisplays dataSources. This datasource can only handle Entities with Billboards, Labels or Points.

      getConfigObject(){Object} inherited

      getDataSourceDisplay(){Cesium.DataSourceDisplay}

      returns the cesium DataSourceDisplay Object

      getDatasources(){Cesium.DataSourceCollection}

      returns the dataSourceCollection associated with the scene

      getEntities(){Cesium.EntityCollection}

      returns the Entities Collection

      getHeightFromTerrain(positions){Promise.<Array.<ol.Coordinate>>}

      getHeight for coordinates

      Name Type Description
      positions Array.<ol.Coordinate>

      in web mercator

      Returns:
      the array of coordinates with heights updated in place

      getId(){string} inherited

      returns the id of this object

      Deprecated
      • Yes

      getName(){string} inherited

      returns the name of the Object, the name is either given by the config Object or a uuid is generated

      Deprecated
      • Yes

      getScene(){Cesium.Scene}

      returns the cesium Viewer Object

      getViewPoint(returnGroundPosition, promiseFlag){vcs.vcm.util.ViewPoint|Promise.<vcs.vcm.util.ViewPoint>}

      Name Type Description
      returnGroundPosition boolean

      whether to return the groundposition or not

      promiseFlag boolean

      gotoViewPoint(viewPoint, optDuration, optMaximumHeight, optCallback)

      sets the view to the given viewpoint

      Name Type Description
      viewPoint vcs.vcm.util.ViewPoint
      optDuration number

      Duration of the animation in secs

      optMaximumHeight number

      Maximum height during animation (can be used to get rid of the bunny hop)

      optCallback function

      is called after animation is completed

      isActive(){boolean} inherited

      returns if this map is currently active

      isInitialized(){boolean} inherited

      checks if the mapobject is already initialized

      Deprecated
      • 3.5

        isSupported(){boolean} inherited

        checks if the current browser supports the MAP, also checks if all dependencies are there

        Deprecated
        • 3.5

          pointIsVisible(coords){boolean}

          Name Type Description
          coords ol.Coordinate

          in WGS84 degrees

          setDay(JulianDate)

          sets the position of the sun according to the day

          Name Type Description
          JulianDate Cesium.JulianDate

          See the Cesium API

          setDebugMode()

          sets the Cesium debug mode.

          setLightning(value)

          sets the lighting of the globe with the sun as a light source

          Name Type Description
          value boolean

          Events

          CLICKED_FIRST_HIT

          vcs.vcm.event.EventType.CLICKED_FIRST_HIT is triggered when the globe is clicked, is always called before vcs.vcm.maps#event:MAP_CLICKED and FEATURE_CLICKED. The clicked position in WGS84 coordinates as longitude, latitude, height and groundLevel properties. The clicked position is the first found intersection, either the clicked point incl. height on a 3d object or the point on the map. In the map case height and groundLevel will be the same.

          Type:
          Deprecated
          • 3.5