Fix crash but leave fixme
This commit is contained in:
parent
0c2814671b
commit
01f8a0a7f2
1 changed files with 15 additions and 8 deletions
|
@ -337,17 +337,13 @@ public class RouteCalculationResult {
|
|||
tunnelAlarm = null;
|
||||
}
|
||||
while (true) {
|
||||
if (i == s.getEndPointIndex() && routeInd != list.size() - 1) {
|
||||
break;
|
||||
}
|
||||
Location n = new Location(""); //$NON-NLS-1$
|
||||
LatLon point = s.getPoint(i);
|
||||
n.setLatitude(point.getLatitude());
|
||||
n.setLongitude(point.getLongitude());
|
||||
//FIXME: investigate gpx file
|
||||
if (s.getObject().getPoint31XTile(i) == 0 && s.getObject().getPoint31YTile(i) == 0){
|
||||
break;
|
||||
}
|
||||
if (i == s.getEndPointIndex() && routeInd != list.size() - 1) {
|
||||
break;
|
||||
}
|
||||
if (vls != null && i * 2 + 1 < vls.length) {
|
||||
float h = vls[2 * i + 1];
|
||||
n.setAltitude(h);
|
||||
|
@ -360,6 +356,17 @@ public class RouteCalculationResult {
|
|||
}
|
||||
lastHeight = h;
|
||||
}
|
||||
// FIXME: investigate gpx file
|
||||
if (s.getObject().getPoint31XTile(i) == 0 && s.getObject().getPoint31YTile(i) == 0) {
|
||||
if (locations.size() > 0) {
|
||||
Location prev = locations.get(locations.size() - 1);
|
||||
n.setLatitude(prev.getLatitude());
|
||||
n.setLongitude(prev.getLongitude());
|
||||
if (prev.hasAltitude()) {
|
||||
n.setAltitude(prev.getAltitude());
|
||||
}
|
||||
}
|
||||
}
|
||||
locations.add(n);
|
||||
attachAlarmInfo(alarms, s, i, locations.size());
|
||||
segmentsToPopulate.add(s);
|
||||
|
|
Loading…
Reference in a new issue