| | |
| | | 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', |