From 9a37c5e1b2190c3f6ec71483923922189091dd52 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 18 Dec 2024 09:42:01 +0800
Subject: [PATCH] 事件模拟更新
---
src/views/pd/components/dynamicPanel.vue | 44 ++++++++++++++++++++++++++++++--------------
1 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/src/views/pd/components/dynamicPanel.vue b/src/views/pd/components/dynamicPanel.vue
index 9abcdd1..3ffde90 100644
--- a/src/views/pd/components/dynamicPanel.vue
+++ b/src/views/pd/components/dynamicPanel.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-11-09 15:41:35
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-17 19:00:23
+ * @LastEditTime: 2024-12-18 09:39:00
* @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
* @Description:
*
@@ -414,19 +414,33 @@
}
const createLinePath = (item, cb = () => { }) => {
- let polyline = new DC.Polyline(item.linePosition)
- polyline.setStyle({
- width: 20,
- material: new DC.PolylineImageTrailMaterialProperty({
- color: DC.Color.RED,
- speed: 20,
- image: VITE_APP_BASE + 'img/mapicon/right.png',
- repeat: { x: 5, y: 1 }
- }),
- clampToGround: false
- })
+ if (item.linePosition) {
+ let polyline = new DC.Polyline(item.linePosition)
+ polyline.setStyle({
+ width: 20,
+ material: new DC.PolylineImageTrailMaterialProperty({
+ color: DC.Color.RED,
+ speed: 20,
+ image: VITE_APP_BASE + 'img/mapicon/right.png',
+ repeat: { x: 5, y: 1 }
+ }),
+ clampToGround: false
+ })
- dynamicLineVectorLayer.addOverlay(polyline)
+ dynamicLineVectorLayer.addOverlay(polyline)
+ } else {
+ let threeCenter = DC.Position.fromObject(item.threePointPosition)
+ let threeCircle = new DC.Circle(threeCenter, 30)
+ threeCircle.setStyle({
+ material: new DC.CircleWaveMaterialProperty({
+ color: DC.Color.fromRandom(),
+ speed: 20,
+ count: 5,
+ gradient: 0.5
+ })
+ })
+ dynamicVectorLayer.addOverlay(threeCircle)
+ }
let threeContent = new DC.DivIcon(
new DC.Position(item.threePointPosition.lng, item.threePointPosition.lat, 70),
@@ -516,7 +530,9 @@
})
} else {
twoFun(item, () => {
- publicFun(item)
+ createLinePath(item, () => {
+ publicFun(item)
+ })
})
}
})
--
Gitblit v1.9.3