|
|
|
|
@ -791,12 +791,10 @@
|
|
|
|
|
// 飞行结果选中图层照片
|
|
|
|
|
|
|
|
|
|
// 项目首页机场位置
|
|
|
|
|
let homeStartGraphic;
|
|
|
|
|
// let homeStartGraphic;
|
|
|
|
|
|
|
|
|
|
let homeStartGraphicLive;
|
|
|
|
|
// 飞行控制机场位置
|
|
|
|
|
// let homeStartGraphicLive;
|
|
|
|
|
let flyStartGraphic;
|
|
|
|
|
|
|
|
|
|
let graphic = null;
|
|
|
|
|
|
|
|
|
|
// // 清空所有数据
|
|
|
|
|
@ -3116,6 +3114,7 @@
|
|
|
|
|
}
|
|
|
|
|
// // 创建点的经纬度信息
|
|
|
|
|
let position = [props.homeAirport.longitude, props.homeAirport.latitude, 70];
|
|
|
|
|
console.log(1111111111111111111,position,props.homeAirport)
|
|
|
|
|
let airportImg =
|
|
|
|
|
props.homeAirport.mode_code == 4
|
|
|
|
|
? '/projecthome/work_airport.png'
|
|
|
|
|
@ -3125,14 +3124,17 @@
|
|
|
|
|
? '/projecthome/work_airport_live.png'
|
|
|
|
|
: '/projecthome/standby_airport_live.png';
|
|
|
|
|
// 更新航点
|
|
|
|
|
let homeStartGraphic = graphicLayer.getGraphicById(`${props.homeAirport.gateway}`);
|
|
|
|
|
let homeStartGraphicLive = graphicLayer.getGraphicById(`${props.homeAirport.gateway}Live`);
|
|
|
|
|
|
|
|
|
|
if (homeStartGraphic && homeStartGraphicLive) {
|
|
|
|
|
homeStartGraphic.position = position;
|
|
|
|
|
homeStartGraphic.image = airportImg;
|
|
|
|
|
homeStartGraphicLive.position = position;
|
|
|
|
|
homeStartGraphicLive.image = airportLiveImg;
|
|
|
|
|
} else {
|
|
|
|
|
homeStartGraphic = new mars3d.graphic.BillboardEntity({
|
|
|
|
|
id: 'set-home-airport',
|
|
|
|
|
let newHomeStartGraphic = new mars3d.graphic.BillboardEntity({
|
|
|
|
|
id: `${props.homeAirport.gateway}`,
|
|
|
|
|
position: position,
|
|
|
|
|
style: {
|
|
|
|
|
image: airportImg,
|
|
|
|
|
@ -3151,8 +3153,8 @@
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
homeStartGraphicLive = new mars3d.graphic.BillboardEntity({
|
|
|
|
|
id: 'set-home-airport-live',
|
|
|
|
|
let newHomeStartGraphicLive = new mars3d.graphic.BillboardEntity({
|
|
|
|
|
id: `${props.homeAirport.gateway}Live`,
|
|
|
|
|
position: position,
|
|
|
|
|
style: {
|
|
|
|
|
image: airportLiveImg,
|
|
|
|
|
@ -3172,17 +3174,17 @@
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
homeStartGraphic.on(mars3d.EventType.click, function (event) {
|
|
|
|
|
newHomeStartGraphic.on(mars3d.EventType.click, function (event) {
|
|
|
|
|
emits('clickAirPort');
|
|
|
|
|
});
|
|
|
|
|
homeStartGraphicLive.on(mars3d.EventType.click, function (event) {
|
|
|
|
|
newHomeStartGraphicLive.on(mars3d.EventType.click, function (event) {
|
|
|
|
|
emits('changeAirportLive', true);
|
|
|
|
|
if (props.homeAirport.mode_code == 4) {
|
|
|
|
|
emits('changeUAVLive', true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
graphicLayer.addGraphic(homeStartGraphic);
|
|
|
|
|
graphicLayer.addGraphic(homeStartGraphicLive);
|
|
|
|
|
graphicLayer.addGraphic(newHomeStartGraphic);
|
|
|
|
|
graphicLayer.addGraphic(newHomeStartGraphicLive);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
// 设置无人机轨迹
|
|
|
|
|
|