| | |
| | | preserveDrawingBuffer: true |
| | | } |
| | | }, |
| | | sceneMode: 2 |
| | | }) |
| | | |
| | | farmRegionLayer = new global.DC.VectorLayer('farmRegionLayer') |
| | |
| | | getDetail(this.$farmId).then(res=>{ |
| | | this.farm.latitude = res.data.data.latitude |
| | | this.farm.longitude = res.data.data.longitude |
| | | global.DC.ready(initViewer(this.farm.latitude,this.farm.longitude)) |
| | | // global.DC.ready(initViewer(this.farm.latitude,this.farm.longitude)) |
| | | |
| | | global.DC.ready(() => { |
| | | initViewer(this.farm.latitude,this.farm.longitude) |
| | | }) |
| | | |
| | | this.addRegionPolyLine(NCregion) |
| | | }) |
| | | }, |
| | |
| | | // }) |
| | | // farmLogoLayer.addOverlay(divIcon) |
| | | } |
| | | const polygon = new global.DC.Polygon(positions) |
| | | polygon.attrParams = item |
| | | polygon.setStyle({ |
| | | material: global.DC.Namespace.Cesium.Color.fromBytes( |
| | | 129, 255, 84, |
| | | 200 |
| | | ) |
| | | }) |
| | | if(positions){ |
| | | const polygon = new global.DC.Polygon(positions) |
| | | polygon.attrParams = item |
| | | polygon.setStyle({ |
| | | material: global.DC.Namespace.Cesium.Color.fromBytes( |
| | | 129, 255, 84, |
| | | 200 |
| | | ) |
| | | }) |
| | | |
| | | polygon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | that.$parent.plotDetailsPopupShow(e.overlay.attrParams) |
| | | that.drawLandPolyLine(positions) |
| | | }) |
| | | polygon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | that.$parent.plotDetailsPopupShow(e.overlay.attrParams) |
| | | that.drawLandPolyLine(positions) |
| | | }) |
| | | |
| | | |
| | | plotRegionLayer.addOverlay(polygon) |
| | | addPlotLayers.push({ center, name: item.landName, id: item.id }) |
| | | plotRegionLayer.addOverlay(polygon) |
| | | addPlotLayers.push({ center, name: item.landName, id: item.id }) |
| | | } |
| | | }, |
| | | /** |
| | | * 地块画线 |
| | |
| | | |
| | | // 根据坐标画线 |
| | | const positions = this.setPositionByLandRange(landObj.landRange) |
| | | console.log(positions,123455555) |
| | | if (positions) { |
| | | this.drawLandPolyLine(positions) |
| | | } |