display switching-to-cloudmade notification in sync with other routing error messages only

This commit is contained in:
sonora 2012-01-28 19:18:48 +01:00
parent a13db31e6d
commit 7995b6e6a3

View file

@ -462,7 +462,10 @@ public class RoutingHelper {
if (serviceToUse == RouteService.OSMAND && !settings.USE_OSMAND_ROUTING_SERVICE_ALWAYS.get()) { if (serviceToUse == RouteService.OSMAND && !settings.USE_OSMAND_ROUTING_SERVICE_ALWAYS.get()) {
double distance = MapUtils.getDistance(end, start.getLatitude(), start.getLongitude()); double distance = MapUtils.getDistance(end, start.getLatitude(), start.getLongitude());
if (distance > DISTANCE_TO_USE_OSMAND_ROUTER) { if (distance > DISTANCE_TO_USE_OSMAND_ROUTER) {
showMessage(context.getString(R.string.osmand_routing_experimental), Toast.LENGTH_LONG); // display notification in sync with other routing error messages below
if (System.currentTimeMillis() - lastTimeEvaluatedRoute > evalWaitInterval) {
showMessage(context.getString(R.string.osmand_routing_experimental), Toast.LENGTH_LONG);
}
serviceToUse = RouteService.CLOUDMADE; serviceToUse = RouteService.CLOUDMADE;
} }
} }