From bad2a73fd798991d64cbb22efef2dfd448450e3a Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Fri, 28 Oct 2022 17:52:00 +0800
Subject: [PATCH] 设备模块数据联动
---
src/utils/EntityDraw.js | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/utils/EntityDraw.js b/src/utils/EntityDraw.js
index df5f66e..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-25 16:38:11
+ * @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
}
@@ -207,6 +207,8 @@
})
+ console.log(JSON.stringify(this.drawCompletePosition), 456)
+
if (this.type === "polyline") {
let polyline = new global.DC.Polyline(this.drawCompletePosition)
@@ -217,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