| | |
| | | |
| | | const center = this.getCenter(positions) |
| | | |
| | | // const divIcon = new global.DC.DivIcon( |
| | | // new global.DC.Position(center[0], center[1], 0), |
| | | // ` |
| | | // <div class="farm-map-icon"> |
| | | // <img src="/img/icon/3858.png" alt=""> |
| | | // // <div>${item.farmName}</div> |
| | | // </div> |
| | | // ` |
| | | // ) |
| | | // divIcon.attrParams = item |
| | | // farmLogoLayer.addOverlay(divIcon) |
| | | if (item.strainUrl != '') { |
| | | const urls = item.strainUrl.split(',') |
| | | let imageStr = '<div class="land-map-icon">' |
| | | urls.forEach(url => { |
| | | imageStr += `<img src="${url}" alt=""width="100px" height="100px" text-align="center" class="strainImg">` |
| | | }) |
| | | imageStr += '</div>' |
| | | const divIcon = new global.DC.DivIcon( |
| | | new global.DC.Position(center[0], center[1], 0), imageStr |
| | | ) |
| | | |
| | | // divIcon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | // that.$parent.showDetailPopup(e.overlay.attrParams) |
| | | // }) |
| | | divIcon.attrParams = item |
| | | farmLogoLayer.addOverlay(divIcon) |
| | | |
| | | divIcon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | that.$parent.plotDetailsPopupShow(e.overlay.attrParams) |
| | | }) |
| | | } |
| | | const polygon = new global.DC.Polygon(positions) |
| | | polygon.attrParams = item |
| | | polygon.setStyle({ |
| | |
| | | */ |
| | | |
| | | setPlotCenter (landObj) { |
| | | console.log(landObj,11111111) |
| | | if (!landObj.landRange) { |
| | | this.$message({ |
| | | message: '当前地块暂未绘制', |
| | | type: 'warning' |
| | | }) |
| | | return |
| | | } |
| | | let center |
| | | addPlotLayers.forEach(item => { |
| | | if (landObj.landName == item.name) { |