【类 型】:
【原 因】: 【过 程】: 【影 响】:
This commit is contained in:
parent
e6cfb81162
commit
00e42da59b
@ -94,9 +94,9 @@ export default {
|
|||||||
// 如果是飞机位置信息 则不是直接刷新状态 而是累计 到数组 以便于画出飞机路径
|
// 如果是飞机位置信息 则不是直接刷新状态 而是累计 到数组 以便于画出飞机路径
|
||||||
const position = JSON.parse(jsonData.position)
|
const position = JSON.parse(jsonData.position)
|
||||||
// 检查 lng, lat, 和 alt 是否不全为零或空值
|
// 检查 lng, lat, 和 alt 是否不全为零或空值
|
||||||
if (position.lng !== 0 && position.lat !== 0 && position.alt !== 0 &&
|
if (position.lng !== 0 && position.lat !== 0 &&
|
||||||
position.lng !== null && position.lat !== null && position.alt !== null &&
|
position.lng !== null && position.lat !== null &&
|
||||||
position.lng !== '' && position.lat !== '' && position.alt !== '') {
|
position.lng !== '' && position.lat !== '') {
|
||||||
plane.planeState.position.push([position.lng / 10e6, position.lat / 10e6, Number(position.alt)])
|
plane.planeState.position.push([position.lng / 10e6, position.lat / 10e6, Number(position.alt)])
|
||||||
}
|
}
|
||||||
if (plane.planeState.position.length > 1000) {
|
if (plane.planeState.position.length > 1000) {
|
||||||
|
Loading…
Reference in New Issue
Block a user