From fb98e10c76d7e6c2d01f3a9f8c1b727f905cbdca Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期一, 05 二月 2024 15:30:50 +0800
Subject: [PATCH] 代码更新

---
 src/components/Screen/mapsdk.vue |   42 +++++++++++++++++++++++++-----------------
 1 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/src/components/Screen/mapsdk.vue b/src/components/Screen/mapsdk.vue
index e30b5a9..841daa8 100644
--- a/src/components/Screen/mapsdk.vue
+++ b/src/components/Screen/mapsdk.vue
@@ -6,6 +6,7 @@
 
 <script>
 let yunxuanLayer = null
+import mapMenu from '../js/index.js'
 export default {
   name: "",
   components: {},
@@ -39,25 +40,9 @@
     // })
   },
   methods: {
-    init3DMap() {
-      //鍦板浘鍒濆鍖�
-      // window.sgworld = new SmartEarth.SGWorld("Centermapdiv", {
-      //   licenseServer: window.sceneConfig.licenseServer,
-      // })
-      // window.sgworld = new SmartEarth.SGWorld(
-      //   "Centermapdiv",
-      //   function () { }
-      // )
-      window.sgworld = new SmartEarth.SGWorld("Centermapdiv", {
-
-        licenseServer: window.sceneConfig.licenseServer,
-      });
-      window.viewer = window.Viewer = window.sgworld._Viewer;
+    initData() {
       if (is_production) {
         Viewer.imageryLayers.removeAll();
-
-
-
       }
       // Viewer.imageryLayers._layers[0].show = false
       sgworld.Navigate.jumpTo({      //璺宠浆瑙嗚
@@ -148,6 +133,28 @@
       //鑳屾櫙閫忔槑
       Viewer.scene.backgroundColor = new Cesium.Color(0.0, 0.0, 0.0, 0.0)
     },
+    init3DMap() {
+      //鍦板浘鍒濆鍖�
+      // window.sgworld = new SmartEarth.SGWorld("Centermapdiv", {
+      //   licenseServer: window.sceneConfig.licenseServer,
+      // })
+      // window.sgworld = new SmartEarth.SGWorld(
+      //   "Centermapdiv",
+      //   function () { }
+      // )
+      window.sgworld = new SmartEarth.SGWorld("Centermapdiv", {
+
+        licenseServer: window.sceneConfig.licenseServer,
+      });
+      window.viewer = window.Viewer = window.sgworld._Viewer;
+      var data = mapMenu.init();
+      data.then((res) => {
+        if (!res) {
+          mapMenu.addGaoDeMap();
+        }
+        this.initData();
+      })
+    },
   },
 }
 </script>
@@ -158,6 +165,7 @@
   height: 100%;
   width: 100%;
 }
+
 #Centermapdiv {
   height: 100%;
   width: 100%;

--
Gitblit v1.9.3