From 5197998c7e965ea01d1c5315e53061053c6a6ab7 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 27 Feb 2018 15:44:44 +0200 Subject: [PATCH] added check for elevation --- .../osmand/plus/measurementtool/MeasurementEditingContext.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java index 95559ba6ef..34dd0b1e5a 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java @@ -309,6 +309,9 @@ public class MeasurementEditingContext { public void onRouteCalculated(List locations) { ArrayList 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();