Bicycle distance warning

This commit is contained in:
Dmitriy Prodchenko 2017-03-20 18:00:06 +02:00
parent 0ba0259091
commit ee3521e980

View file

@ -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<TargetPoint> list = getIntermediatePointsWithTarget();
if(!list.isEmpty()) {
if(current != null && MapUtils.getDistance(list.get(0).point, current.getLatitude(), current.getLongitude()) > dist) {