文章目录
Viewer
new Cesium.Viewer(container, options)
Widgets/Viewer/Viewer.js 325
A base widget for building applications. It composites all of the standard Cesium widgets into one reusable package. The widget can always be extended by using mixins, which add functionality useful for a variety of applications.
一个建造应用的基础控件。
它合成了全部的标准Cesium控件到一个可以重复使用的包。
这个控件常常可以通过使用mixins(混合)进行扩展。大概是混合标准控件的意思
它通常为各种应用添加有用的功能。
Name | Type | Description |
---|---|---|
container | Element,String | The DOM element or ID that will contain the widget. |
options | Viewer.ConstructorOptions | optional Object describing initialization options. |
Throws:
DeveloperError : Element with id “container” does not exist in the document.
DeveloperError : options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget, specify options.imageryProvider instead.
DeveloperError : options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget, specify options.terrainProvider instead.
Example:
//Initialize the viewer widget with several custom options and mixins.
var viewer = new Cesium.Viewer('cesiumContainer', {
//Start in Columbus Viewer
sceneMode : Cesium.SceneMode.COLUMBUS_VIEW,