Merge pull request #9847 from osmandapp/issues_158_no_ele_after_attach
Issues 158 no ele after attach
This commit is contained in:
commit
b8927c568f
3 changed files with 9 additions and 3 deletions
|
@ -549,8 +549,10 @@ public class RoutePlannerFrontEnd {
|
|||
if (start != null && start.pnt == null) {
|
||||
gctx.routePointsSearched++;
|
||||
RouteSegmentPoint rsp = findRouteSegment(start.loc.getLatitude(), start.loc.getLongitude(), gctx.ctx, null, false);
|
||||
if (MapUtils.getDistance(rsp.getPreciseLatLon(), start.loc) < distThreshold) {
|
||||
start.pnt = rsp;
|
||||
if (rsp != null) {
|
||||
if (MapUtils.getDistance(rsp.getPreciseLatLon(), start.loc) < distThreshold) {
|
||||
start.pnt = rsp;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (start != null && start.pnt != null) {
|
||||
|
|
|
@ -328,7 +328,7 @@ public class RouteSegmentResult implements StringExternalizable<RouteDataBundle>
|
|||
for (int i = 0; i < length; i++) {
|
||||
Location location = resources.getLocation(index);
|
||||
if (location == null) {
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
double dist = 0;
|
||||
if (prevLocation != null) {
|
||||
|
|
|
@ -341,6 +341,10 @@ public class RouteCalculationResult {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue