From 247e608e8ddc6ad741dd980149766b4f5c9b25a7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 25 Nov 2015 13:33:51 +0100 Subject: [PATCH] Update map actions --- .../plus/activities/MapActivityActions.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index f1847179af..f812986f4e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -451,17 +451,18 @@ public class MapActivityActions implements DialogProvider { settings.LAST_ROUTING_APPLICATION_MODE != ApplicationMode.DEFAULT) { mode = settings.LAST_ROUTING_APPLICATION_MODE; } - if (from != null && targets.getPointToNavigate() != null) { - double dist = MapUtils.getDistance(from, targets.getPointToNavigate().getLatitude(), - targets.getPointToNavigate().getLongitude()); - if (dist >= 50000 && mode.isDerivedRoutingFrom(ApplicationMode.PEDESTRIAN)) { - mode = ApplicationMode.CAR; - } else if (dist >= 300000 && mode.isDerivedRoutingFrom(ApplicationMode.BICYCLE)) { - mode = ApplicationMode.CAR; - } else if (dist < 2000 && mode.isDerivedRoutingFrom(ApplicationMode.CAR)) { - mode = ApplicationMode.PEDESTRIAN; - } - } + // didn't provide good results +// if (from != null && targets.getPointToNavigate() != null) { +// double dist = MapUtils.getDistance(from, targets.getPointToNavigate().getLatitude(), +// targets.getPointToNavigate().getLongitude()); +// if (dist >= 50000 && mode.isDerivedRoutingFrom(ApplicationMode.PEDESTRIAN)) { +// mode = ApplicationMode.CAR; +// } else if (dist >= 300000 && mode.isDerivedRoutingFrom(ApplicationMode.BICYCLE)) { +// mode = ApplicationMode.CAR; +// } else if (dist < 2000 && mode.isDerivedRoutingFrom(ApplicationMode.CAR)) { +// mode = ApplicationMode.PEDESTRIAN; +// } +// } } return mode; }