| | |
| | | |
| | | data () { |
| | | return { |
| | | |
| | | polyline: null |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | 'polyline' (newObj,oldObj) { |
| | | if (newObj && oldObj) { |
| | | plotRegionLayer.removeOverlay(oldObj) |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | |
| | | }) |
| | | |
| | | polygon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | polygon.setStyle({ |
| | | |
| | | // 画线 |
| | | this.polyline = new global.DC.Polyline(positions) |
| | | this.polyline.setStyle({ |
| | | width: 4, |
| | | material: global.DC.Namespace.Cesium.Color.fromBytes( |
| | | 129, 255, 0, |
| | | 200 |
| | | ) |
| | | 200, 255, 255, |
| | | 200 |
| | | ), |
| | | clampToGround: true |
| | | }) |
| | | plotRegionLayer.addOverlay(this.polyline) |
| | | that.$parent.plotDetailsPopupShow(e.overlay.attrParams) |
| | | }) |
| | | |