From 99261472db3be7bf31149b19db259bc76cfcbb71 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Tue, 21 Jan 2014 01:58:52 +0100 Subject: [PATCH] Test new routing provider (alpha routing should work with java for quite long distance). Maps needs to be updated (new regeneration 22 Jan --- OsmAnd-java/src/net/osmand/osm/edit/OsmMapUtils.java | 3 ++- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/osm/edit/OsmMapUtils.java b/OsmAnd-java/src/net/osmand/osm/edit/OsmMapUtils.java index 1b5a7c0883..feca02e3cf 100644 --- a/OsmAnd-java/src/net/osmand/osm/edit/OsmMapUtils.java +++ b/OsmAnd-java/src/net/osmand/osm/edit/OsmMapUtils.java @@ -184,8 +184,9 @@ public class OsmMapUtils { } if (cycle) { result.add(n.get(first)); - kept[first] = true; } + kept[first] = true; + return kept; } diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 8e8e04a5be..bff09897de 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -421,8 +421,8 @@ public class RouteProvider { memoryLimit, specialization); RoutingContext ctx = router.buildRoutingContext(cf, params.ctx.getInternalAPI().getNativeLibrary(), files, // TODO introduce - /*params.mode.isDerivedRoutingFrom(ApplicationMode.CAR) ? - RouteCalculationMode.COMPLEX : */RouteCalculationMode.NORMAL); + params.mode.isDerivedRoutingFrom(ApplicationMode.CAR) ? + RouteCalculationMode.COMPLEX : RouteCalculationMode.NORMAL); ctx.calculationProgress = params.calculationProgress; if(params.previousToRecalculate != null) { ctx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute();