Browse Source

3. 后台监控区域定义时新增飞入

master
DIAMOND 1 year ago
parent
commit
23dce422e1
  1. 46
      src/views/military/modules/ai/monitorArea/components/VCEarthViewer.vue

46
src/views/military/modules/ai/monitorArea/components/VCEarthViewer.vue

@ -518,47 +518,25 @@ function fly(viewer: any = null) {
viewDistance = data.viewDistance; viewDistance = data.viewDistance;
duration = data.duration ? data.duration : 0; duration = data.duration ? data.duration : 0;
// viewer.camera.flyTo(position, viewDistance, rotation, duration); // viewer.camera.flyTo(position, viewDistance, rotation, duration);
console.log("data", position, viewDistance, rotation, duration); // console.log("data", position, viewDistance, rotation, duration);
} else { } else {
// //
position = [parentData[0].lon, parentData[0].lat, parentData[0].altitude]; position = [parentData[0].lon, parentData[0].lat, parentData[0].altitude];
rotation = [parentData[0].rotationX, parentData[0].rotationY, parentData[0].rotationZ]; rotation = [parentData[0].rotationX, parentData[0].rotationY, parentData[0].rotationZ];
viewDistance = parentData[0].viewDistance; viewDistance = parentData[0].viewDistance;
duration = parentData[0].duration; duration = parentData[0].duration;
console.log("data2", position, viewDistance, rotation, duration); // console.log("data", position, viewDistance, rotation, duration);
//
// let CartesianPosition = ellipsoid.cartographicToCartesian({
// x: position[0], y: position[1], z: position[2]
// });
// let CartesianPosition = ellipsoid.cartographicToCartesian(position[0],position[1],position[2]);
// console.log("CartesianPosition", CartesianPosition);
//
// viewer.camera.flyTo(CartesianPosition, viewDistance, rotation, duration);
// viewer.camera.flyTo({
// x: -990536.0465518984,
// y: 5531995.514841362,
// z: 3004737.189031571,
// duration: 1.0,
// });
// viewer.camera.position = {
// x: -990536.0465518984,
// y: 5531995.514841362,
// z: 3004737.189031571,
// }
// viewer.camera.position = CartesianPosition
// for (let record of data) {
// if (record.sceneCode.length == 11) {
// continue;
// }
// //
// this.setLoginPoint(record);
// }
} }
} else { //
let CartesianPosition = ellipsoid.cartographicToCartesian({
longitude: position[0],
latitude: position[1],
height: position[2]
});
// console.log("CartesianPosition", CartesianPosition);
viewer.camera.position = CartesianPosition
}
else {
// //
} }
} }

Loading…
Cancel
Save