From c3172c1b618141b538fdd0af4e503246b41f9135 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 08 Nov 2024 17:15:32 +0800
Subject: [PATCH] 管网

---
 src/views/space/components/box/dataContent.vue |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/views/space/components/box/dataContent.vue b/src/views/space/components/box/dataContent.vue
index c0a43f5..8d6d8fe 100644
--- a/src/views/space/components/box/dataContent.vue
+++ b/src/views/space/components/box/dataContent.vue
@@ -148,6 +148,34 @@
     0
   ), () => {
   })
+
+  let layer = new DC.VectorLayer('layer')
+  window.$viewer.addLayer(layer)
+  let positions = generatePosition(row.lng, row.lat)
+  let material = new DC.PolylineDashMaterialProperty({
+    color: DC.Color.ORANGE
+  })
+  positions.forEach(item => {
+    let label = new DC.CustomLabel(
+      item,
+      row.name
+    )
+    label.setStyle({
+      fillColor: DC.Color.YELLOW,
+      font: '12px',
+      pixelOffset: { x: 0, y: -10 }
+    })
+    label.setVLine({
+      width: 2,
+      material
+    })
+    layer.addOverlay(label)
+  })
+}
+function generatePosition(lng, lat) {
+  let list = []
+  list.push(new DC.Position(lng, lat, 3000))
+  return list
 }
 
 // 查看详情

--
Gitblit v1.9.3