GeoBIMWidget

new Cesium.GeoBIMWidget(options)

BIM组件界面插件类
Name Type Description
options Object optional 参数选项:
Name Type Description
viewer GeoJSON optional 三维视图对象
tileset String optional BIM模型对象
selectedColor Color optional 鼠标左键选中时显示的颜色和点击最下层子节点时模型显示的颜色
anchor String optional BIM组件位置,可以是以下值之一:'left'、'right'
Author:
  • zhoue
Example:
var bimWidget = new Cesium.GeoBIMWidget({
   viewer: viewer,
   tileset: tileset,
   selectedColor: Cesium.Color.GREEN,
   anchor: 'left',
})
//从第三级节点开始播放动画
bimWidget.play(3);
//选中树节点事件,回调
bimWidget.onTreeNodeSelected.addEventListener(function(node){
     console.log(node)
})
//鼠标左键点击模型事件,回调
bimWidget.onBIMFeatureSelected.addEventListener(function(feature){
     var propertyNames = feature.getPropertyNames();
     var length = propertyNames.length;
     for (var i = 0; i < length; ++i) {
         var propertyName = propertyNames[i];
         console.log(feature.getProperty(propertyName));
     }   
})

Members

readonlyonBIMFeatureSelected : Event

鼠标左键单击模型选中事件

readonlyonTreeNodeSelected : Event

树节点点击事件

Methods

destroy()

销毁

play(animationLevel)

添加BIM模型生长动画监听事件
Name Type Description
animationLevel Number 从第几级节点播放动画

stop()

移除BIM模型生长动画监听事件,退出动画