吉安感知网项目-前端
罗广辉
2026-03-04 b5bbbd19cf0b3c2b7674e5ecb6c1847f0ec734e4
feat: 贴地
1 files modified
9 ■■■■■ changed files
applications/drone-command/src/views/detectionCountermeasure/detectionRange/DetectionRangeDialog.vue 9 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/views/detectionCountermeasure/detectionRange/DetectionRangeDialog.vue
@@ -311,6 +311,7 @@
                width: 40,
                height: 56,
                verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 设置图片底部对齐坐标点
                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
            },
            label: {
                text: `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`,
@@ -325,7 +326,7 @@
                outlineWidth: 1,
                outlineColor: Cesium.Color.WHITE,
                pixelOffset: new Cesium.Cartesian2(0, -72),
                eyeOffset: new Cesium.Cartesian3(0, 0, -20),
                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
            },
        })
    } else {
@@ -391,7 +392,7 @@
                material: Cesium.Color.fromCssColorString('#6b9ca8').withAlpha(0.6),
                outline: true,
                outlineColor: Cesium.Color.fromCssColorString('#6b9ca8').withAlpha(0.6),
                heightReference: Cesium.HeightReference.NONE,
                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
            },
        })
        return
@@ -437,7 +438,9 @@
function handleMapClick(click) {
    const pos = click.position
    const cartesian3 = viewer.camera.pickEllipsoid(pos, viewer.scene.globe.ellipsoid)
    const ray = viewer.camera.getPickRay(pos)
    if (!ray) return
    const cartesian3 = viewer.scene.globe.pick(ray, viewer.scene)
    if (!cartesian3) return
    const carto = Cesium.Cartographic.fromCartesian(cartesian3)
    const longitude = Number(Cesium.Math.toDegrees(carto.longitude).toFixed(6))