xieqy 1 year ago
parent
commit
0c305b08b3

+ 1 - 1
src/views/groupPage/baseMap/components/ProjectMap.vue

@@ -195,7 +195,7 @@ export default {
         this.addInitScene()
         this.addTerrain()
         this.initModulesContentShow()
-      }, 3000)
+      }, 5000)
     },
     addRoad() {
       let viewer = this.viewer

+ 4 - 3
src/views/groupPage/districtPageModules/customTools/layerControl.vue

@@ -612,18 +612,19 @@ export default {
       let layers = this.viewer.scene.layers.layerQueue.filter((i) => i.sceneType == 'BIM模型'),
         temp = []
       layers.forEach((item) => {
+        const { lat, lon } = item
         let target = temp.find((i) => i.label == item.aliasName)
         if (!target) {
-          temp.push({ label: item.aliasName, children: [], info: { ...item } })
+          temp.push({ label: item.aliasName, children: [], info: { lat, lon } })
         }
       })
-      this.BIMLayers = temp
+      this.BIMLayers = JSON.parse(JSON.stringify(temp))
     },
     LocateToBIM(data) {
       const { info } = data || {}
       const { lat, lon } = info
       this.viewer.camera.flyTo({
-        destination: Cesium.Cartesian3.fromDegrees(lon, lat, 500),
+        destination: Cesium.Cartesian3.fromDegrees(lon, lat, 2500),
         orientation: {
           heading: 0,
           pitch: Cesium.Math.toRadians(-90),