2 Commits 4066932e8c ... d839d6d2d4

Author SHA1 Message Date
  wdq d839d6d2d4 Merge branch 'master' of http://47.103.92.60:3003/skyversation/xujingtown_irflcmp_ui 7 months ago
  wdq 41dd4f7628 修改定位 7 months ago
2 changed files with 11 additions and 14 deletions
  1. 10 13
      src/components/Map.vue
  2. 1 1
      src/store/index.js

+ 10 - 13
src/components/Map.vue

@@ -126,13 +126,18 @@ export default {
             that.loadTheWorldMapImage(url);
           });
           viewer.camera.setView({
-            destination: SkyScenery.Cartesian3.fromDegrees(121, 31, 30000.0), // 设置位置
+            destination: SkyScenery.Cartesian3.fromDegrees(
+              121.29818074250946,
+              31.11623998465621,
+              7538.855340945846
+            ), // 设置位置
             orientation: {
-              heading: SkyScenery.Math.toRadians(0.0), // 方向
-              pitch: SkyScenery.Math.toRadians(-90.0), // 倾斜角度
-              roll: 0,
-            },
+              heading: SkyScenery.Math.toRadians(356.03124515798294), // 方向
+              pitch: SkyScenery.Math.toRadians(-45.31422437550821), // 倾斜角度
+              roll: SkyScenery.Math.toRadians(0.0047792745453184024)
+            }
           });
+
           this.$store.commit("createdMap", true);
           return;
         }, 0);
@@ -269,14 +274,6 @@ export default {
             "https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer",
         })
       );
-      viewer.camera.setView({
-        destination: SkyScenery.Cartesian3.fromDegrees(121, 31, 30000.0), // 设置位置
-        orientation: {
-          heading: SkyScenery.Math.toRadians(0.0), // 方向
-          pitch: SkyScenery.Math.toRadians(-90.0), // 倾斜角度
-          roll: 0,
-        },
-      });
     },
 
     // 加载geojson数据

+ 1 - 1
src/store/index.js

@@ -2,7 +2,7 @@ import { createStore } from 'vuex'
 
 export default createStore({
   state: {
-    initMap: false
+    initMap: false,
   },
   getters: {
   },