无人机管理后台前端(已迁走)
chenyao
2025-09-15 801066f0e1bfa0c0b514542858abe593ee0f0b49
feat:去除多余内容
1 files modified
24 ■■■■■ changed files
src/views/gridManagement/gridManagement.vue 24 ●●●●● patch | view | raw | blame | history
src/views/gridManagement/gridManagement.vue
@@ -468,30 +468,6 @@
        heightReference: Cesium.HeightReference.NONE,
      }
  });
    // 获取两点在屏幕上的位置
    // const screenPos1 = Cesium.SceneTransforms?.wgs84ToWindowCoordinates?.(viewer.scene, position1)
    // || viewer.scene.cartesianToCanvasCoordinates(position1);
    // const screenPos2 = Cesium.SceneTransforms?.wgs84ToWindowCoordinates?.(viewer.scene, position2)
    // || viewer.scene.cartesianToCanvasCoordinates(position2);
    // // // 生成屏幕矩形
    // const boundingRect = new Cesium.BoundingRectangle(
    //   Math.min(screenPos1.x, screenPos2.x),
    //   Math.min(screenPos1.y, screenPos2.y),
    //   Math.abs(screenPos1.x - screenPos2.x),
    //   Math.abs(screenPos1.y - screenPos2.y)
    // );
    // const center = Cesium.Cartesian3.midpoint(screenPos1, screenPos2, new Cesium.Cartesian3());
    // const angle = Cesium.Math.PI_OVER_FOUR; // 45度
    // viewer.entities.add({
    //   position: center,
    //   rectangle: {
    //     coordinates: boundingRect,
    //     material: Cesium.Color.BLUE.withAlpha(0.5),
    //     rotation: angle // 弧度制旋转
    //   }
    // });
  // viewer.entities.add({
  //   id: `line`,
  //   polyline: {