Fix route points
This commit is contained in:
parent
14272afa44
commit
077f57c830
1 changed files with 9 additions and 0 deletions
|
@ -141,9 +141,18 @@ public class MultiProfileGeometryWay extends GeometryWay<MultiProfileGeometryWay
|
|||
routePoints.add(new LatLon(start.lat, start.lon));
|
||||
routePoints.add(new LatLon(end.lat, end.lon));
|
||||
} else {
|
||||
List<WptPt> points = roadSegmentData.getPoints();
|
||||
if (points.get(0).getLatitude() != start.getLatitude() && points.get(0).getLongitude() != start.getLongitude()) {
|
||||
routePoints.add(new LatLon(start.lat, start.lon));
|
||||
}
|
||||
for (WptPt routePt : roadSegmentData.getPoints()) {
|
||||
routePoints.add(new LatLon(routePt.lat, routePt.lon));
|
||||
}
|
||||
int lastIdx = routePoints.size() - 1;
|
||||
if (routePoints.get(lastIdx).getLatitude() != end.getLatitude()
|
||||
&& routePoints.get(lastIdx).getLongitude() != end.getLongitude()) {
|
||||
routePoints.add(new LatLon(end.lat, end.lon));
|
||||
}
|
||||
}
|
||||
return routePoints;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue