【类 型】:fix

【原  因】:指点时候 会从飞机状态里拿高度 但是更进入页面 数组里没有高度信息 控制台回台出警告
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
szdot 2025-06-22 15:21:04 +08:00
parent 3b4940ac4a
commit 5f711afb1d

View File

@ -117,8 +117,16 @@ export default {
this.dialogVisible = true
this.dialogItem = 'guidedBox'
this.guidedLonLat = lonLat //
//
let height = 0
if (this.plane && this.plane.planeState && Array.isArray(this.plane.planeState.position)) {
const posLen = this.plane.planeState.position.length
this.guidedAlt = this.plane.planeState.position[posLen - 1][2]//
if (posLen > 0 && Array.isArray(this.plane.planeState.position[posLen - 1])) {
height = this.plane.planeState.position[posLen - 1][2] || 0
}
}
this.guidedAlt = height
},
//
onMapReady () {