| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-10-18 17:17:50 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-10-27 09:55:27 |
| | | * @LastEditTime: 2022-10-28 16:08:49 |
| | | * @FilePath: \srs-police-affairs\src\utils\EntityDraw.js |
| | | * @Description: |
| | | * |
| | |
| | | return |
| | | } |
| | | } else { |
| | | if (this.activeShapePoints.length < 4) { |
| | | if (this.activeShapePoints.length < 3) { |
| | | global.viewer.tooltip.showAt(event.windowPosition, '不能绘制成面,请继续添加点') |
| | | return |
| | | } |
| | |
| | | ) |
| | | }) |
| | | |
| | | this.drawPolylineLayer.addOverlay(polyline) |
| | | let coords = global.DC.GeoTools.polylineBuffer(this.drawCompletePosition, 100) |
| | | |
| | | let polygon = new global.DC.Polygon(coords) |
| | | |
| | | polygon.setStyle({ |
| | | material: global.DC.Color.RED.withAlpha(0.4) |
| | | }) |
| | | |
| | | this.drawPolylineLayer.addOverlay(polygon) |
| | | |
| | | this.drawPolylineLayer.addOverlay(polyline) |
| | | } else { |
| | | let polygon = new global.DC.Polygon(this.drawCompletePosition) |
| | | |