maxiaoxiao hai 5 meses
pai
achega
cfd17c7971

+ 15 - 0
src/components/3DAnalysis/Projection/index.vue

@@ -10,6 +10,7 @@
         left: 0px;
         width: 200px;
         height: 200px;
+        z-index: 100;
       "
       autoplay
       loop
@@ -135,6 +136,7 @@ export default {
         distance: 200,
         visibleLine: true,
       },
+      center: null,
     };
   },
   mounted() {
@@ -143,6 +145,9 @@ export default {
     this.$nextTick(() => {
       proInit();
       this.videoElement = document.getElementById("trailer");
+      this.center = document.createElement("div");
+      this.center.setAttribute("class", "addCenter");
+      document.body.appendChild(this.center);
     });
   },
   methods: {
@@ -172,4 +177,14 @@ export default {
 </script>
 
 <style>
+.addCenter {
+  position: absolute;
+  left: calc(50% - 3px);
+  top: calc(50% - 3px);
+  background: yellow;
+  border: 2px solid BLACK;
+  border-radius: 50%;
+  width: 6px;
+  height: 6px;
+}
 </style>

+ 0 - 11
src/components/3DAnalysis/Projection/projectionImage.js

@@ -29,16 +29,6 @@ export function proInit(pdistance = 300) {
     });
 
     projectionImage = new Cesium.ProjectionImage(scene);
-    centerPoint = viewer.entities.add({
-        id: 'cameraCenter',
-        position: Cesium.Cartesian3.ZERO, // 初始位置设为当前视角中心,稍后更新
-        point: {
-            pixelSize: 10,
-            color: Cesium.Color.YELLOW,
-            outlineColor: Cesium.Color.BLACK,
-            outlineWidth: 2
-        }
-    });
     handler = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Point);
 
     handler.movingEvt.addEventListener(function (windowPosition) {
@@ -61,7 +51,6 @@ export function proInit(pdistance = 300) {
             //通过该点设置视频投放对象的距离及方向
             projectionImage.setDistDirByPoint([longitude, latitude, height]);
             projectionImage.distance = pdistance;
-            centerPoint.position = Cesium.Cartesian3.fromDegrees(longitude, latitude, 0)
 
         }
         // })