diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 1408d7e..e5bd7c3 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -197,11 +197,12 @@ export default { // 如果是飞机位置信息 则不是直接刷新状态 而是累计 到数组 以便于画出飞机路径 const position = JSON.parse(jsonData.position) // 检查 lon, lat, 和 alt 是否不全为零或空值 - if (position.lon !== 0 && position.lat !== 0 && - position.lon !== null && position.lat !== null && - position.lon !== '' && position.lat !== '') { - plane.planeState.position.push([position.lon / 10e6, position.lat / 10e6, Number(position.alt)]) - } + // if (position.lon !== 0 && position.lat !== 0 && + // position.lon !== null && position.lat !== null && + // position.lon !== '' && position.lat !== '') { + // plane.planeState.position.push([position.lon / 10e6, position.lat / 10e6, Number(position.alt)]) + // } + plane.planeState.position.push([position.lon / 10e6, position.lat / 10e6, Number(position.alt)]) if (plane.planeState.position.length > 1000) { plane.planeState.position.shift() // 删除最早的经纬度 }