cesium transform 倾斜摄影模型矩阵指定经纬度

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>模型矩阵</title>
  <link href="src/Cesium/Widgets/widgets.css" rel="stylesheet" />
  <script src="src/Cesium/Cesium.js"></script>
  <script src="src/dat.gui.min.js"></script>
  <script src="src/cesium-transform.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    html,
    body,
    #viewer-container {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }

    #btn {
      position: absolute;
      top: 50px;
      left: 50px;
    }
  </style>
</head>

<body>
  <div id="viewer-container"></div>
  <script>
    // init
    function initPage() {
      // 切换自己的token
      Cesium.Ion.defaultAccessToken = '..rk-n3tDfpFCaqLvsklRWMI9z5TZhjrv-';

      // 初始化
      viewer = new Cesium.Viewer("viewer-container", {
        infoBox: false,
        shouldAnimate: true,
        vrButton: true,
        geocoder: false,
        homeButton: false,
        sceneModePicker: false,
        baseLayerPicker: true,
        navigationHelpButton: false,
        animation: false,
        timeline: false,
        fullscreenButton: false,
      });

      // tilset地址
      const url = 'http://earthsdk.com/v/last/Apps/assets/dayanta/tileset.json'

      // 基础参数
      let tileModelParam = {
        url: url,
        scale: 1.0,
        longitude: 116.29393709916772,
        latitude: 39.935457593075405,
        height: 0.0,
        rx: 0,
        ry: 0,
        rz: 0,
        alphaEnble: false,
        alpha: 1.0
      }
      // 调用调整面板
      TilesetMatrixPanel(viewer, { tileModelParam: tileModelParam })

    }

    // load
    window.onload = function () {
      initPage()
    }
  </script>
</body>

</html>

 

上一篇:地图可视化开发技术选型


下一篇:Cesium 天地图倾斜摄影 矩阵变换 更改经纬度