Merge pull request #5076 from osmandapp/MeasureDistanceZeroElevationFix

added check for elevation
This commit is contained in:
Alexander Sytnyk 2018-02-27 16:08:45 +02:00 committed by GitHub
commit c033f1ad60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -309,6 +309,9 @@ public class MeasurementEditingContext {
public void onRouteCalculated(List<Location> locations) {
ArrayList<WptPt> pts = new ArrayList<>(locations.size());
for (Location loc : locations) {
if(!loc.hasAltitude()){
continue;
}
WptPt pt = new WptPt();
pt.lat = loc.getLatitude();
pt.lon = loc.getLongitude();