添加起飞点和关机点
This commit is contained in:
parent
6fcf791891
commit
6a3dafac8c
@ -1556,8 +1556,6 @@ export default {
|
||||
|
||||
},
|
||||
toggleTaskSceneShow(info, index) {
|
||||
console.log(info, 12312123);
|
||||
|
||||
// console.log('切换的info', info)
|
||||
// console.log('无人机详情面板', this.detailInfo)
|
||||
if (info.check) {
|
||||
|
||||
@ -17,11 +17,44 @@ export default class UavTarget {
|
||||
this.startAltitude = options.startAltitude
|
||||
this.lang = window.localStorage.getItem('locale') || 'zh_CN'
|
||||
this.addPlanLine(options.airlineList)
|
||||
console.log(options, '飞机数据');
|
||||
if (options.startLon) {
|
||||
// this.addUav(options)
|
||||
}
|
||||
this.addUavLoader(options.payloadList)
|
||||
this.addFlightStartEndPoint(options)
|
||||
}
|
||||
addFlightStartEndPoint(info) {
|
||||
const airline = info.airlineList[0]
|
||||
const startPointPosition = DT.Cesium.Cartesian3.fromDegrees(airline.flightStartLon, airline.flightStartLat, airline.flightStartHeight)
|
||||
let id1 = `${info.jobId}-start-point`
|
||||
this.addPoint(id1, startPointPosition, '开机点')
|
||||
const endPointPosition = DT.Cesium.Cartesian3.fromDegrees(airline.flightEndLon, airline.flightEndLat, airline.flightEndHeight)
|
||||
let id2 = `${info.jobId}-end-point`
|
||||
this.addPoint(id2, endPointPosition, '关机点')
|
||||
}
|
||||
addPoint(id, position, text) {
|
||||
this.viewer.entities.add({
|
||||
id,
|
||||
position,
|
||||
label: {
|
||||
text,
|
||||
font: '14px sans-serif',
|
||||
fillColor: DT.Cesium.Color.WHITE,
|
||||
horizontalOrigin: DT.Cesium.HorizontalOrigin.LEFT,
|
||||
verticalOrigin: DT.Cesium.VerticalOrigin.CENTER,
|
||||
disableDepthTestDistance: 100000,
|
||||
pixelOffset: new DT.Cesium.Cartesian2(10, 0),
|
||||
showBackground: true,
|
||||
scaleByDistance: new DT.Cesium.NearFarScalar(0, 1, 1, 0.8),
|
||||
distanceDisplayCondition: new DT.Cesium.DistanceDisplayCondition(0, 20000),
|
||||
style: DT.Cesium.LabelStyle.FILL_AND_OUTLINE,
|
||||
},
|
||||
point: {
|
||||
pixelSize: 8,
|
||||
color: DT.Cesium.Color.fromCssColorString('#2bc20c'),
|
||||
disableDepthTestDistance: 10000
|
||||
},
|
||||
})
|
||||
}
|
||||
addUav(info) {
|
||||
let that = this
|
||||
|
||||
Loading…
Reference in New Issue
Block a user