From bd1e222a894e903bd28390df132320a7975c1f18 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 02 Dec 2024 21:15:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/main'

---
 src/pages/map/components/scomponents/layersControl.vue |   74 ++++++++++++++++++------------------
 1 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/src/pages/map/components/scomponents/layersControl.vue b/src/pages/map/components/scomponents/layersControl.vue
index 0948af1..4e6c14c 100644
--- a/src/pages/map/components/scomponents/layersControl.vue
+++ b/src/pages/map/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-10-31 10:47:29
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-02 19:46:13
+ * @LastEditTime: 2024-12-02 21:12:23
  * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
  * @Description:
  *
@@ -238,16 +238,6 @@
         children: [
           // 给水管网、污水管网、燃气管网、雨水管网
           {
-            id: '3-3-1',
-            label: '给水管网',
-            type: 'layer',
-            subType: 'geojsonPipe',
-            layerName: 'gsgw',
-            source: gsgw,
-            color: DC.Color.BLUE.withAlpha(0.9),
-            height: 65,
-          },
-          {
             id: '3-3-2',
             label: '污水管网',
             type: 'layer',
@@ -255,17 +245,7 @@
             layerName: 'wsgw',
             source: wsgw,
             color: DC.Color.DARKBLUE.withAlpha(0.9),
-            height: 68,
-          },
-          {
-            id: '3-3-3',
-            label: '燃气管网',
-            type: 'layer',
-            subType: 'geojsonPipe',
-            layerName: 'rqgw',
-            source: rqgw,
-            color: DC.Color.RED.withAlpha(0.9),
-            height: 71,
+            height: 60.2,
           },
           {
             id: '3-3-4',
@@ -275,7 +255,27 @@
             layerName: 'ysgw',
             source: ysgw,
             color: DC.Color.CYAN.withAlpha(0.9),
-            height: 75,
+            height: 60,
+          },
+          {
+            id: '3-3-1',
+            label: '给水管网',
+            type: 'layer',
+            subType: 'geojsonPipe',
+            layerName: 'gsgw',
+            source: gsgw,
+            color: DC.Color.BLUE.withAlpha(0.9),
+            height: 60.4,
+          },
+          {
+            id: '3-3-3',
+            label: '燃气管网',
+            type: 'layer',
+            subType: 'geojsonPipe',
+            layerName: 'rqgw',
+            source: rqgw,
+            color: DC.Color.RED.withAlpha(0.9),
+            height: 60.6,
           },
         ]
       },
@@ -480,7 +480,7 @@
         },
         showParams: 'category',
         className: 'fxy-ordinary',
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png',
+        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-yb.png',
         showPanel: false,
         layerName: 'fxyOrdinary',
         incident: (e) => {
@@ -517,7 +517,7 @@
         },
         showParams: 'category',
         className: 'fxy-larger',
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png',
+        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-jd.png',
         showPanel: false,
         layerName: 'fxyLarger',
         incident: (e) => {
@@ -685,7 +685,7 @@
           // })
           addTileLayers[item.layerName] = []
           item.urlData.forEach((m, ind) => {
-            let tile = new DC.Tileset(m.url, {
+            addTileLayers[item.layerName][ind] = new DC.Tileset(m.url, {
               maximumMemoryUsage: 1024,
               maximumScreenSpaceError: 8,
               skipLevels: 5,
@@ -694,13 +694,12 @@
               progressiveResolutionHeightFraction: 0.5,
               baseScreenSpaceError: 1024
             })
-            tile.setSplitDirection(1)
+            addTileLayers[item.layerName][ind].setSplitDirection(1)
             // tile.setHeight(-420)
             // tile.setSplitDirection(-1)
-            window.$viewer.sceneSplit.addTileset(tile)
-            tileLayers.addOverlay(tile)
+            window.$viewer.sceneSplit.addTileset(addTileLayers[item.layerName][ind])
+            tileLayers.addOverlay(addTileLayers[item.layerName][ind])
             window.$viewer.sceneSplit.enable = false
-            addTileLayers[item.layerName][ind] = tile
           })
         } else {
           addTileLayers[item.layerName].forEach(m => m.show = true)
@@ -794,7 +793,7 @@
           item.source.features.forEach(i => {
             let polylineVolume = new DC.PolylineVolume(
               i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
-              computeCircle(2)
+              computeCircle(1.6)
             )
 
             polylineVolume.setStyle({
@@ -971,15 +970,10 @@
 }
 
 onUnmounted(() => {
-  if (tileLayers) {
-    tileLayers.clear()
-    window.$viewer && window.$viewer.removeLayer(tileLayers)
-    tileLayers = null
-  }
-
   let arr = Object.keys(addTileLayers)
   arr.forEach(i => {
     if (i == 'hgyq') {
+      tileLayers.removeOverlay(addTileLayers[i])
       addTileLayers[i] = null
       delete addTileLayers[i]
     } else {
@@ -989,6 +983,12 @@
     }
   })
   addTileLayers = null
+
+  if (tileLayers) {
+    tileLayers.remove()
+    window.$viewer && window.$viewer.removeLayer(tileLayers)
+    tileLayers = null
+  }
   // 弹窗销毁
   destroy()
   addPupoLayers = null

--
Gitblit v1.9.3