CesiumWidget

CesiumWidget

new

A widget containing a Cesium scene.

Parameters:
Name Type Argument Description
container Element | String The DOM element or ID that will contain the widget.
options Object <optional>
Configuration options for the widget.
Properties
Name Type Argument Default Description
clock Clock <optional>
new Clock() The clock to use to control current time.
imageryProvider ImageryProvider <optional>
new BingMapsImageryProvider() The imagery provider to serve as the base layer.
terrainProvider TerrainProvider <optional>
new EllipsoidTerrainProvider The terrain provider.
Throws:
Example
// For each example, include a link to CesiumWidget.css stylesheet in HTML head,
// and in the body, include: <div id="cesiumContainer"></div>

//Widget with no terrain and default Bing Maps imagery provider.
var widget = new Cesium.CesiumWidget('cesiumContainer');

//Widget with OpenStreetMaps imagery provider and Cesium terrain provider hosted by AGI.
var widget = new Cesium.CesiumWidget('cesiumContainer', {
    imageryProvider : new Cesium.OpenStreetMapImageryProvider(),
    terrainProvider : new Cesium.CesiumTerrainProvider({
        url : 'http://cesium.agi.com/smallterrain',
        credit : 'Terrain data courtesy Analytical Graphics, Inc.'
    })
});
Source:

Members

<static> :Canvas

Gets the canvas.

<static> :CentralBody

Gets the central body.
Gets the Cesium logo.

<static> :Clock

Gets the clock view model.

<static> :Element

Gets the parent container.

<static> :Element

Gets the widget DOM element, which contains the canvas and Cesium logo.

<static> :Scene

Gets the scene.

<static> :SceneTransitioner

Gets the scene transitioner.

Methods

Destroys the widget. Should be called if permanently removing the widget from layout.

Returns:
Boolean true if the object has been destroyed, false otherwise.

<static>

Forces an update and render of the scene. This function is called automatically.

<static>

Call this function when the widget changes size, to update the canvas size, camera aspect ratio, and viewport size. This function is called automatically on window resize.