Slightly modify default router perferences
This commit is contained in:
parent
0755a5459c
commit
9d91d90633
2 changed files with 7 additions and 7 deletions
|
@ -177,7 +177,7 @@ public class BinaryRoutePlanner {
|
|||
};
|
||||
PriorityQueue<RouteSegment> graphSegments = new PriorityQueue<RouteSegment>(50, segmentsComparator);
|
||||
// initialize temporary lists to calculate not forbidden ways at way intersections
|
||||
ArrayList<RouteSegment> segmentsToVisitPrescricted = new ArrayList<RouteSegment>(5);
|
||||
ArrayList<RouteSegment> segmentsToVisitPrescripted = new ArrayList<RouteSegment>(5);
|
||||
ArrayList<RouteSegment> segmentsToVisitNotForbidden = new ArrayList<RouteSegment>(5);
|
||||
|
||||
// Set to not visit one segment twice (stores road.id << X + segmentStart)
|
||||
|
@ -282,7 +282,7 @@ public class BinaryRoutePlanner {
|
|||
RouteSegment next = ctx.routes.get(l);
|
||||
if (next != null) {
|
||||
|
||||
segmentsToVisitPrescricted.clear();
|
||||
segmentsToVisitPrescripted.clear();
|
||||
segmentsToVisitNotForbidden.clear();
|
||||
boolean exclusiveRestriction = false;
|
||||
|
||||
|
@ -355,7 +355,7 @@ public class BinaryRoutePlanner {
|
|||
// case exclusive restriction (only_right, only_straight, ...)
|
||||
exclusiveRestriction = true;
|
||||
segmentsToVisitNotForbidden.clear();
|
||||
segmentsToVisitPrescricted.add(next);
|
||||
segmentsToVisitPrescripted.add(next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -369,7 +369,7 @@ public class BinaryRoutePlanner {
|
|||
for(RouteSegment s : segmentsToVisitNotForbidden){
|
||||
graphSegments.add(s);
|
||||
}
|
||||
for(RouteSegment s : segmentsToVisitPrescricted){
|
||||
for(RouteSegment s : segmentsToVisitPrescripted){
|
||||
graphSegments.add(s);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ import net.osmand.osm.LatLon;
|
|||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.osm.Way;
|
||||
import net.osmand.router.BinaryRoutePlanner;
|
||||
import net.osmand.router.RouteSegmentResult;
|
||||
import net.osmand.router.BinaryRoutePlanner.RouteSegment;
|
||||
import net.osmand.router.BinaryRoutePlanner.RouteSegmentResult;
|
||||
import net.osmand.router.BinaryRoutePlanner.RouteSegmentVisitor;
|
||||
import net.osmand.router.BinaryRoutePlanner.RoutingContext;
|
||||
|
||||
|
@ -48,8 +48,8 @@ import org.xml.sax.SAXException;
|
|||
|
||||
public class MapRouterLayer implements MapPanelLayer {
|
||||
|
||||
private /*final */ static boolean ANIMATE_CALCULATING_ROUTE = true;
|
||||
private /*final */ static int SIZE_OF_ROUTES_TO_ANIMATE = 1;
|
||||
private /*final */ static boolean ANIMATE_CALCULATING_ROUTE = false;
|
||||
private /*final */ static int SIZE_OF_ROUTES_TO_ANIMATE = 50;
|
||||
|
||||
|
||||
private MapPanel map;
|
||||
|
|
Loading…
Reference in a new issue