From ee3521e98049a5c51eaf10705f9dd4f16f66abc4 Mon Sep 17 00:00:00 2001 From: Dmitriy Prodchenko Date: Mon, 20 Mar 2017 18:00:06 +0200 Subject: [PATCH] Bicycle distance warning --- OsmAnd/src/net/osmand/plus/TargetPointsHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java index b3bc3525d3..f834d3834d 100644 --- a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java +++ b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java @@ -478,7 +478,9 @@ public class TargetPointsHelper { return false; } Location current = routingHelper.getLastProjection(); - double dist = 400000; + double dist = 400000; + if (ApplicationMode.BICYCLE.isDerivedRoutingFrom(routingHelper.getAppMode()) + && settings.getCustomRoutingBooleanProperty("height_obstacles", false).getModeValue(routingHelper.getAppMode())) { dist = 50000; } List list = getIntermediatePointsWithTarget(); if(!list.isEmpty()) { if(current != null && MapUtils.getDistance(list.get(0).point, current.getLatitude(), current.getLongitude()) > dist) {