From 2ea1dfa6c3d9b5083abfeeb8d5d759d5751f007b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 28 Oct 2022 16:13:29 +0800
Subject: [PATCH] 增加面分析
---
src/utils/EntityDraw.js | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/utils/EntityDraw.js b/src/utils/EntityDraw.js
index 2b0994e..cd75167 100644
--- a/src/utils/EntityDraw.js
+++ b/src/utils/EntityDraw.js
@@ -2,7 +2,7 @@
* @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:
*
@@ -185,7 +185,7 @@
return
}
} else {
- if (this.activeShapePoints.length < 4) {
+ if (this.activeShapePoints.length < 3) {
global.viewer.tooltip.showAt(event.windowPosition, '不能绘制成面,请继续添加点')
return
}
@@ -219,8 +219,17 @@
)
})
- 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)
--
Gitblit v1.9.3