cesium学习6-相机camera

视角设置

 viewer.camera.setView({
        destination:Cesium.Cartesian3.fromDegrees(118.0658439,24.5915414,2500),//目的地
        orientation:{
            heading:Cesium.Math.toDegrees(0),//左右平移0
            pitch:Cesium.Math.toDegrees(90),//上下点头90
            roll:Cesium.Math.toDegrees(0),//歪头0
        }
    })

  相机飞行

  setTimeout(() => {

      viewer.camera.flyTo({

          destination: position,

          orientation: {//和上面一样三个参数

              // heading: Cesium.Math.toDegrees(0),//左右平移0

              // pitch: Cesium.Math.toDegrees(0),//上下点头90

              // roll: Cesium.Math.toDegrees(0),//歪头0

          },

          duration:3//飞行时间

      });

  }, 3000);

lookat

const position3 = Cesium.Cartesian3.fromDegrees(118.0658439, 24.5915414);
  viewer.camera.lookAt(
    position3, //位置锁定
    new Cesium.HeadingPitchRange(
      Cesium.Math.toRadians(0),
      Cesium.Math.toRadians(-90),
      20000
    )
  );

对于entities实体:相机锁定该实体

viewer.zoomTo(point)//地图跳转

相关推荐

  1. cesium学习6-相机camera

    2024-06-05 22:34:07       7 阅读
  2. cesium-2】Cesium相机系统

    2024-06-05 22:34:07       43 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-05 22:34:07       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-05 22:34:07       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-05 22:34:07       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-05 22:34:07       18 阅读

热门阅读

  1. Pytorch常用函数用法归纳:Tensor张量之间的计算

    2024-06-05 22:34:07       10 阅读
  2. 704. 二分查找

    2024-06-05 22:34:07       9 阅读
  3. 【leetcode--判断子序列】

    2024-06-05 22:34:07       7 阅读
  4. Python表达且:深入剖析其逻辑与实现

    2024-06-05 22:34:07       7 阅读
  5. Oracle数据库面试题-5

    2024-06-05 22:34:07       7 阅读
  6. 前端面试指南(一面)

    2024-06-05 22:34:07       9 阅读
  7. 力扣567.字符串的排列

    2024-06-05 22:34:07       7 阅读