| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-31 10:47:29 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-28 11:43:20 |
| | | * @LastEditTime: 2024-11-28 15:23:01 |
| | | * @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue |
| | | * @Description: |
| | | * |
| | |
| | | } |
| | | }, |
| | | |
| | | { |
| | | id: '3-7', |
| | | label: '消防沙', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 7, |
| | | size: 1000 |
| | | }, |
| | | backgroundIcon: VITE_APP_BASE + 'img/mapicon/xfs.png', |
| | | className: 'xfs-box', |
| | | showPanel: false, |
| | | layerName: 'xfs', |
| | | incident: (e) => { |
| | | const { attrParams } = e.overlay |
| | | // 删除 |
| | | destroy() |
| | | if (!attrParams.imageUrl) { |
| | | return |
| | | } |
| | | addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name) |
| | | window.$viewer.addLayer(addPupoLayers[attrParams.name]) |
| | | let iconEl = `<div class="marsBlueGradientPnl"> |
| | | <div>${attrParams.fullName}</div> |
| | | <img src="${attrParams.imageUrl}" width="160" height="160" /> |
| | | </div>` |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(attrParams.lng, attrParams.lat, 64), |
| | | `<div class="public-map-popup-two"> |
| | | ${iconEl} |
| | | </div>` |
| | | ) |
| | | let incident = () => { |
| | | destroy() |
| | | } |
| | | divIcon.on(DC.MouseEventType.CLICK, incident) |
| | | addPupoLayers[attrParams.name].addOverlay(divIcon) |
| | | } |
| | | }, |
| | | { |
| | | id: '3-8', |
| | | label: '沟渠', |