From 5560b09cb96ef7564a901e514d7545767ae401c1 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 15 Sep 2025 10:05:07 +0800
Subject: [PATCH] feat:更新网格管理
---
src/views/gridManagement/gridManagement.vue | 41 ++++++++++++++++++++++-------------------
1 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/src/views/gridManagement/gridManagement.vue b/src/views/gridManagement/gridManagement.vue
index 8b870d3..bfae19a 100644
--- a/src/views/gridManagement/gridManagement.vue
+++ b/src/views/gridManagement/gridManagement.vue
@@ -398,7 +398,7 @@
viewer.entities.removeAll()
const { longitude, latitude } = cartesian3Convert(viewer.scene.pickPosition(movement.position), viewer)
let result = await getLnglatAltitude(longitude, latitude, viewer)
- let height = result.height + 60
+ let height = result.height + 2
const point = { longitude, latitude, height }
pointList.value.push(point)
ShowTwoPoints()
@@ -410,23 +410,25 @@
const position = Cesium.Cartesian3.fromDegrees(
Number(item.longitude),
Number(item.latitude),
- Number(item.height)
+ Number(item.height),
)
viewer.entities.add({
id: `point-${index}`,
position: position,
- billboard: {
- image: new Cesium.ConstantProperty(newStartPoint),
- width: 40,
- height: 40,
+ point: {
+ pixelSize: 10,
+ color: Cesium.Color.fromCssColorString('#FFFFFF'),
+ clampToGround: true,
+ heightReference: Cesium.HeightReference.NONE,
},
})
- viewer?.entities.add({
- id: 'placement-' + index,
- position: position,
- polyline: getPolyLine(viewer, { value: pointList.value }, index),
- })
+ // viewer?.entities.add({
+ // id: 'placement-' + index,
+ // position: position,
+ // polyline: getPolyLine(viewer, { value: pointList.value }, index),
+ // })
})
+ if (pointList.value.length < 2) return
const position1 = Cesium.Cartesian3.fromDegrees(
Number(pointList.value[0].longitude),
Number(pointList.value[0].latitude),
@@ -455,14 +457,15 @@
viewer.entities.add({
rectangle: {
- coordinates: Cesium.Rectangle.fromDegrees(west, south, east, north),
- material: Cesium.Color.RED.withAlpha(0.5),
- outline: true,
- outlineColor: Cesium.Color.RED,
- outlineWidth: 2,
- height: 60,
- extrudedHeight: 60,
- heightReference: Cesium.HeightReference.NONE
+ // disableDepthTestDistance: Number.POSITIVE_INFINITY,
+ coordinates: Cesium.Rectangle.fromDegrees(west, south, east, north),
+ material: Cesium.Color.RED.withAlpha(0.5),
+ outline: true,
+ outlineColor: Cesium.Color.RED,
+ outlineWidth: 2,
+ height: pointList.value[1].height,
+ extrudedHeight: pointList.value[1].height,
+ heightReference: Cesium.HeightReference.NONE,
}
});
// 获取两点在屏幕上的位置
--
Gitblit v1.9.3