From 198b83ce825fbbf912cb26d592e3c7b0b586ca92 Mon Sep 17 00:00:00 2001
From: 王旭 <1377869194@qq.com>
Date: 星期一, 20 二月 2023 17:38:22 +0800
Subject: [PATCH] 数据管理页面格式

---
 src/components/Screen/mapsdk.vue |  122 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 109 insertions(+), 13 deletions(-)

diff --git a/src/components/Screen/mapsdk.vue b/src/components/Screen/mapsdk.vue
index 2894c7b..18c9190 100644
--- a/src/components/Screen/mapsdk.vue
+++ b/src/components/Screen/mapsdk.vue
@@ -21,24 +21,120 @@
         licenseServer: window.sceneConfig.licenseServer,
       })
 
-      window.Viewer = window.sgworld._Viewer
+      window.viewer = window.Viewer = window.sgworld._Viewer
       Viewer.imageryLayers._layers[0].show = false
       //瀹氫綅
       // Viewer.camera.flyTo({
       //   destination: Cesium.Cartesian3.fromDegrees(110, 33, 25000000),
       // })
-      Viewer.camera.flyTo({
-        destination: {
-          x: -3919623.6069864673,
-          y: 13752070.475126158,
-          z: 8307291.863719194,
-        },
-        orientation: {
-          heading: 6.283185307179582,
-          roll: 0,
-          pitch: -1.5707039123519846,
-        },
-      })
+      // Viewer.camera.flyTo({
+      //   destination: {
+      //     x: -10834926.182758586,
+      //     y: 50483318.61217012,
+      //     z: 38375099.7193183,
+      //   },
+      //   orientation: {
+      //     heading: 6.283185307179578,
+      //     roll: 0,
+      //     pitch: -1.56436861046299,
+      //   },
+      // })
+      //寮�鍚� tick61.2
+
+      // Cesium.Camera.DEFAULT_VIEW_RECTANGLE = {
+      //   west: -3.141592653589793,
+      //   south: -1.5707963267948966,
+      //   east: 3.141592653589793,
+      //   north: 1.5707963267948966,
+      // }
+
+      viewer.clock.shouldAnimate = true
+      //姣忔鏃嬭浆鐨勫姬搴� 瓒婂皬瓒婃參
+      var angle = Cesium.Math.toRadians(Math.PI * 1)
+      // 鏃嬭浆娆℃暟 鐢ㄦ潵鎺у埗鍋滄
+      var rotate_num = 0
+      function onTickCallback() {
+        viewer.scene.camera.rotate(Cesium.Cartesian3.UNIT_Z, angle)
+        //浠ヤ笅鐢ㄦ潵鎺у埗 鍋滄
+        rotate_num++
+        // 110 娆℃棆杞竴鍛�
+        if (rotate_num == 1) {
+          Viewer.camera.flyTo({
+            destination: {
+              x: -2395735.480669514,
+              y: 35646557.30966785,
+              z: 33320031.01620178,
+            },
+            orientation: {
+              heading: 6.283185307179578,
+              roll: 0,
+              pitch: -1.5687480368906144,
+            },
+          })
+        }
+        if (rotate_num == 220) {
+          Viewer.camera.flyTo({
+            destination: {
+              x: -4022999.313498903,
+              y: 19214082.70976515,
+              z: 13043510.373621361,
+            },
+            orientation: {
+              heading: 6.283185307179577,
+              roll: 0,
+              pitch: -1.5643686104630592,
+            },
+          })
+        }
+        if (rotate_num === 330) {
+          //缁撴潫鏃嬭浆
+          viewer.clock.onTick.removeEventListener(onTickCallback)
+          //鍙互鍐嶆帴瀹氫綅鍔ㄧ敾
+          Viewer.camera.flyTo({
+            destination: {
+              x: -3919623.6069864673,
+              y: 13752070.475126158,
+              z: 8307291.863719194,
+            },
+            orientation: {
+              heading: 6.283185307179582,
+              roll: 0,
+              pitch: -1.5707039123519846,
+            },
+          })
+        }
+      }
+      // 鍒╃敤鏃堕挓杩涜鐩戝惉
+      viewer.clock.onTick.addEventListener(onTickCallback)
+      // setTimeout(() => {
+      //   Viewer.camera.flyTo({
+      //     destination: {
+      //       x: -4022999.313498903,
+      //       y: 19214082.70976515,
+      //       z: 13043510.373621361,
+      //     },
+      //     orientation: {
+      //       heading: 6.283185307179577,
+      //       roll: 0,
+      //       pitch: -1.5643686104630592,
+      //     },
+      //   })
+      // }, 1000)
+
+      // setTimeout(() => {
+      //   Viewer.camera.flyTo({
+      //     destination: {
+      //       x: -3919623.6069864673,
+      //       y: 13752070.475126158,
+      //       z: 8307291.863719194,
+      //     },
+      //     orientation: {
+      //       heading: 6.283185307179582,
+      //       roll: 0,
+      //       pitch: -1.5707039123519846,
+      //     },
+      //   })
+      // }, 1000)
 
       Viewer.imageryLayers.addImageryProvider(
         new Cesium.UrlTemplateImageryProvider({

--
Gitblit v1.9.3