| | |
| | | |
| | | addPlotPolygon (positions, item) { |
| | | const that = this |
| | | |
| | | 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) |
| | | |
| | | // divIcon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | // that.$parent.showDetailPopup(e.overlay.attrParams) |
| | | // }) |
| | | |
| | | if(item.strainUrl !=""){ |
| | | const divIcon = new global.DC.DivIcon( |
| | | new global.DC.Position(center[0], center[1], 0), |
| | | ` |
| | | <div class="farm-map-icon"> |
| | | <img src="${item.strainUrl}" alt=""width="50%" height="50%" text-align="center"> |
| | | </div> |
| | | ` |
| | | ) |
| | | divIcon.attrParams = item |
| | | farmLogoLayer.addOverlay(divIcon) |
| | | divIcon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | that.$parent.showDetailPopup(e.overlay.attrParams) |
| | | }) |
| | | } |
| | | const polygon = new global.DC.Polygon(positions) |
| | | polygon.attrParams = item |
| | | polygon.setStyle({ |