智慧园区前端大屏
shuishen
2025-01-15 4c5536009e72a030404eaa3b3f5585f7c9e03663
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: 2025-01-14 20:24:37
 * @LastEditTime: 2025-01-15 14:29:52
 * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -74,6 +74,8 @@
import { getList as getRiskList } from "@/api/riskSource/riskSource"
import { getPanoramaList } from "@/api/panorama/"
import yqfw from "@/assets/json/shape"
import track from "@/assets/json/track"
// import gsgw from "@/assets/json/gsgw"
// import rqgw from "@/assets/json/rqgw"
import wsgw from "@/assets/json/wsgw"
@@ -608,6 +610,17 @@
    }
  },
  {
    id: '8',
    label: '内外水系',
    type: 'layer',
    subType: 'geojsonPolyline',
    layerName: 'track',
    source: track,
    color: DC.Color.BLUE.withAlpha(0.9),
    height: 30,
  },
  /* {
    id: '8',
    label: '地面全景分布',
@@ -910,7 +923,26 @@
        } else {
          addTileLayers[item.layerName].show = true
        }
      } else if (item.subType == 'geojsonPolyline') {
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
          item.source.features.forEach(i => {
            let Polyline = new DC.Polyline(i.geometry.coordinates.map(d => [...d, item.height].join(',')).join(';'))
            Polyline.setStyle({
              width: 3,
              material: DC.Color.BLUE,
              clampToGround: true
            })
            addTileLayers[item.layerName].addOverlay(Polyline)
          })
        } else {
          addTileLayers[item.layerName].show = true
        }
      }
    } else {
      if (addTileLayers[item.layerName]) {
        if (item.subType == '3Dtile') {