new CesiumWidget
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
  | 
        
Throws:
- 
DeveloperError : container is required.
 - 
DeveloperError : Element with id "container" does not exist in the document.
 
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.'
    })
});
    
	
	
Members
- 
    
<static> this.canvas :Canvas
 - 
    
    Gets the canvas.
 - 
    
<static> this.centralBody :CentralBody
 - 
    
    Gets the central body.
 - 
    
<static> this.cesiumLogo :Element
 - 
    
    Gets the Cesium logo.
 - 
    
<static> this.clock :Clock
 - 
    
    Gets the clock view model.
 - 
    
<static> this.container :Element
 - 
    
    Gets the parent container.
 - 
    
<static> this.element :Element
 - 
    
    Gets the widget DOM element, which contains the canvas and Cesium logo.
 - 
    
<static> this.scene :Scene
 - 
    
    Gets the scene.
 - 
    
<static> this.transitioner :SceneTransitioner
 - 
    
    Gets the scene transitioner.
 
Methods
- 
    
destroy
 - 
    
    
    
Destroys the widget. Should be called if permanently removing the widget from layout.
 - 
    
isDestroyed
 - 
    
    
    
	
	
    
    
    
    
    
    
    
    
    
    
Returns:
Boolean true if the object has been destroyed, false otherwise. - 
    
<static> prototype.render
 - 
    
    
    
Forces an update and render of the scene. This function is called automatically.
 - 
    
<static> prototype.resize
 - 
    
    
    
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.
 
