| | |
| | | backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png', |
| | | showPanel: false, |
| | | layerName: 'fxyOrdinary', |
| | | incident: (e) => { |
| | | const { attrParams } = e.overlay |
| | | // 删除 |
| | | destroy() |
| | | addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name) |
| | | window.$viewer.addLayer(addPupoLayers[attrParams.name]) |
| | | let iconEl = `<div class="marsBlueGradientPnl"> |
| | | <li>${attrParams.firmName || ''}</li> |
| | | <li>${attrParams.riskLevelName || ''}</li> |
| | | </div>` |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(attrParams.lng, attrParams.lat, 64), |
| | | `<div class="public-map-popup-three"> |
| | | ${iconEl} |
| | | </div>` |
| | | ) |
| | | let incident = () => { |
| | | destroy() |
| | | } |
| | | divIcon.on(DC.MouseEventType.CLICK, incident) |
| | | addPupoLayers[attrParams.name].addOverlay(divIcon) |
| | | } |
| | | }, |
| | | { |
| | | id: '4-2', |
| | |
| | | backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png', |
| | | showPanel: false, |
| | | layerName: 'fxyLarger', |
| | | 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) |
| | | |
| | | // 删除 |
| | | destroy() |
| | | addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name) |
| | | window.$viewer.addLayer(addPupoLayers[attrParams.name]) |
| | | let iconEl = `<div class="marsBlueGradientPnl"> |
| | | <li>${attrParams.firmName || ''}</li> |
| | | <li>${attrParams.riskLevelName || ''}</li> |
| | | </div>` |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(attrParams.lng, attrParams.lat, 64), |
| | | `<div class="public-map-popup-three"> |
| | | ${iconEl} |
| | | </div>` |
| | | ) |
| | | let incident = () => { |
| | | destroy() |
| | | } |
| | | divIcon.on(DC.MouseEventType.CLICK, incident) |
| | | addPupoLayers[attrParams.name].addOverlay(divIcon) |
| | | } |
| | | } |
| | | ] |
| | | }, |