|
|
|
@ -51,7 +51,15 @@
|
|
|
|
|
'waylineInfo',
|
|
|
|
|
'workPlanFormShow',
|
|
|
|
|
'airPort',
|
|
|
|
|
'uavTrack',
|
|
|
|
|
]);
|
|
|
|
|
watch(
|
|
|
|
|
() => props.uavTrack,
|
|
|
|
|
(val) => {
|
|
|
|
|
setUAVPosition();
|
|
|
|
|
},
|
|
|
|
|
{ deep: true },
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => props.airPort,
|
|
|
|
@ -528,6 +536,7 @@
|
|
|
|
|
if (props.airPort) {
|
|
|
|
|
setAirportPosition();
|
|
|
|
|
}
|
|
|
|
|
setUAVPosition();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -1532,26 +1541,20 @@
|
|
|
|
|
const setAirportPosition = async () => {
|
|
|
|
|
let point = graphicLayer.getGraphicById('set-airport');
|
|
|
|
|
// // 创建点的经纬度信息
|
|
|
|
|
let position = [props.airPort.latitude, props.airPort.longitude, 70];
|
|
|
|
|
let position = [props.airPort.longitude, props.airPort.latitude, 70];
|
|
|
|
|
// 更新航点
|
|
|
|
|
if (point) {
|
|
|
|
|
point.setOptions({
|
|
|
|
|
id: 'set-airport',
|
|
|
|
|
name: '航点',
|
|
|
|
|
name: '机场位置',
|
|
|
|
|
position: position,
|
|
|
|
|
style: {
|
|
|
|
|
image: '/map/AchievementManage.png',
|
|
|
|
|
image: '/projecthome/airport.png',
|
|
|
|
|
width: 35,
|
|
|
|
|
height: 59,
|
|
|
|
|
scale: 1,
|
|
|
|
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
|
|
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
|
|
label: {
|
|
|
|
|
text: '航点',
|
|
|
|
|
font_size: 14,
|
|
|
|
|
color: '#ffffff',
|
|
|
|
|
outline: true,
|
|
|
|
|
outlineColor: '#000000',
|
|
|
|
|
pixelOffsetY: -35,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
@ -1559,23 +1562,70 @@
|
|
|
|
|
id: 'set-airport',
|
|
|
|
|
position: position,
|
|
|
|
|
style: {
|
|
|
|
|
image: '/map/AchievementManage.png',
|
|
|
|
|
image: '/projecthome/airport.png',
|
|
|
|
|
width: 35,
|
|
|
|
|
height: 59,
|
|
|
|
|
scale: 1,
|
|
|
|
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
|
|
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
|
|
label: {
|
|
|
|
|
text: '机场位置',
|
|
|
|
|
font_size: 14,
|
|
|
|
|
color: '#ffffff',
|
|
|
|
|
outline: true,
|
|
|
|
|
outlineColor: '#000000',
|
|
|
|
|
pixelOffsetY: -35,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
graphicLayer.addGraphic(startGraphic);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const uavList = ref([
|
|
|
|
|
// [118.29665332645175, 35.13459536363883, 81.6864700317383],
|
|
|
|
|
// [118.29665332645185, 35.13459536363883, 81.6894700317393],
|
|
|
|
|
]);
|
|
|
|
|
// 设置无人机轨迹
|
|
|
|
|
const setUAVPosition = () => {
|
|
|
|
|
const position = [props.uavTrack.longitude, props.uavTrack.latitude, props.uavTrack.height];
|
|
|
|
|
let flag1 = uavList.value.findIndex((item) => {
|
|
|
|
|
return item == position;
|
|
|
|
|
});
|
|
|
|
|
if (flag1 == -1) {
|
|
|
|
|
uavList.value.push(position);
|
|
|
|
|
}
|
|
|
|
|
// const fixedRoute = new mars3d.graphic.FixedRoute({
|
|
|
|
|
// name: '步行路线',
|
|
|
|
|
// position: {
|
|
|
|
|
// type: 'time', // 时序动态坐标
|
|
|
|
|
// speed: 700,
|
|
|
|
|
// pauseTime: 0.5,
|
|
|
|
|
// list: uavList.value,
|
|
|
|
|
// },
|
|
|
|
|
// frameRate: 1,
|
|
|
|
|
// showStop: true,
|
|
|
|
|
// model: {
|
|
|
|
|
// // url: '/projecthome/walk.gltf',
|
|
|
|
|
// url: 'https://data.mars3d.cn/gltf/mars/man/walk.gltf',
|
|
|
|
|
// scale: 5,
|
|
|
|
|
// minimumPixelSize: 50,
|
|
|
|
|
// },
|
|
|
|
|
// polyline: {
|
|
|
|
|
// color: '#ffff00',
|
|
|
|
|
// width: 2,
|
|
|
|
|
// },
|
|
|
|
|
// });
|
|
|
|
|
// graphicLayer.addGraphic(fixedRoute);
|
|
|
|
|
|
|
|
|
|
const graphic = new mars3d.graphic.BillboardPrimitive({
|
|
|
|
|
position: {
|
|
|
|
|
type: 'time', // 时序动态坐标
|
|
|
|
|
speed: 600,
|
|
|
|
|
list: uavList.value,
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
image: '/projecthome/flightOperation.png',
|
|
|
|
|
width: 117,
|
|
|
|
|
height: 105,
|
|
|
|
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
|
|
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
|
|
},
|
|
|
|
|
attr: { remark: '点状数据time类型position' },
|
|
|
|
|
});
|
|
|
|
|
graphicLayer.addGraphic(graphic);
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|