|
@@ -119,14 +119,16 @@ function getAirwayPoints(airway, pointBefore, pointAfter) {
|
|
|
let found = 0
|
|
let found = 0
|
|
|
let points = []
|
|
let points = []
|
|
|
|
|
|
|
|
- let pointTypeFix, pointsFix
|
|
|
|
|
|
|
+ let pointTypeFix, pointsFix, pointIdFix
|
|
|
|
|
|
|
|
if ('points' in airway) {
|
|
if ('points' in airway) {
|
|
|
pointTypeFix = 'point_type';
|
|
pointTypeFix = 'point_type';
|
|
|
pointsFix = 'points'
|
|
pointsFix = 'points'
|
|
|
|
|
+ pointIdFix = 'point_id'
|
|
|
} else {
|
|
} else {
|
|
|
pointTypeFix = 'pointType'
|
|
pointTypeFix = 'pointType'
|
|
|
pointsFix = 'airlines'
|
|
pointsFix = 'airlines'
|
|
|
|
|
+ pointIdFix = 'pointId'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 如果前后是其他航线,那么找到交叉点作为前后的点
|
|
// 如果前后是其他航线,那么找到交叉点作为前后的点
|
|
@@ -139,7 +141,7 @@ function getAirwayPoints(airway, pointBefore, pointAfter) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for (let point of airway[pointsFix]) {
|
|
for (let point of airway[pointsFix]) {
|
|
|
- if (pointBefore.point_id == point.point_id || pointAfter.point_id == point.point_id) {
|
|
|
|
|
|
|
+ if (pointBefore[pointIdFix] == point.point_id || pointAfter[pointIdFix] == point.point_id) {
|
|
|
found++
|
|
found++
|
|
|
points.push(Object.assign({}, point))
|
|
points.push(Object.assign({}, point))
|
|
|
continue
|
|
continue
|