Cesium 场景保存与恢复

position = viewer.camera.positionWC.clone();
up = viewer.camera.up.clone();
direction = viewer.camera.direction.clone();
flyHome() {
      let that = this;
      viewer.camera.flyTo({
        destination: new Cesium.Cartesian3(
          that.homePos.position.x,
          that.homePos.position.y,
          that.homePos.position.z
        ),
        orientation: {
          direction: new Cesium.Cartesian3(
            that.homePos.direction.x,
            that.homePos.direction.y,
            that.homePos.direction.z
          ),
          up: new Cesium.Cartesian3(
            that.homePos.up.x,
            that.homePos.up.y,
            that.homePos.up.z
          )
        }
      });
    },

 

上一篇:cesium制作飞机路线图


下一篇:vue+cesium实现自定义弹窗