// 切换前执行
this._viewer.sceneModePicker.viewModel.morphTo2D.afterExecute.addEventListener(() => {
do something...
});
// 切换后执行
this._viewer.sceneModePicker.viewModel.morphTo2D.afterExecute.addEventListener(() => {
do something...
});
判断当前场景的二三维:
if (this._viewer.scene.mode !== SceneMode.SCENE3D) {
this._viewer.scene.morphTo3D(0);
}
备注:
morphTo3D切换到3d,
morphTo2D切换到2d,
morphToColumbusView切换到哥伦比亚视图