智慧园区前端大屏
linwe
2024-12-03 225fab98ed3666d4542ed45eca514558d033384d
src/pages/map/components/scomponents/layersControl.vue
@@ -449,7 +449,32 @@
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/psk.png',
        className: 'xfs-box',
        showPanel: false,
        layerName: 'psk'
        layerName: 'psk',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
          destroyPop()
          if (!attrParams.firmName) {
            return
          }
          addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
          window.$viewer.addLayer(addPopLayers[attrParams.id])
          let iconEl = `<div class="marsBlueGradientPnl">
            <div>${attrParams.firmName}</div>
            <div>${attrParams.mainFuncName}</div>
                </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-two">
                    ${iconEl}
                  </div>`
          )
          let incident = () => {
            destroyPop()
          }
          divIcon.on(DC.MouseEventType.CLICK, incident)
          addPopLayers[attrParams.id].addOverlay(divIcon)
        }
      },
      // {
      //   id: '3-11',