Fix route options

This commit is contained in:
Victor Shcherb 2012-12-14 00:57:11 +01:00
parent 4eb39fc8da
commit 9a7107c2de

View file

@ -331,19 +331,19 @@ public class RouteProvider {
p = GeneralRouterProfile.CAR;
}
List<String> specs = new ArrayList<String>();
if (!app.getSettings().FAST_ROUTE_MODE.get()) {
if (!app.getSettings().FAST_ROUTE_MODE.getModeValue(params.mode)) {
specs.add(GeneralRouter.USE_SHORTEST_WAY);
}
if(app.getSettings().AVOID_FERRIES.get()){
if(app.getSettings().AVOID_FERRIES.getModeValue(params.mode)){
specs.add(GeneralRouter.AVOID_FERRIES);
}
if(app.getSettings().AVOID_TOLL_ROADS.get()){
if(app.getSettings().AVOID_TOLL_ROADS.getModeValue(params.mode)){
specs.add(GeneralRouter.AVOID_TOLL);
}
if(app.getSettings().AVOID_MOTORWAY.get()){
if(app.getSettings().AVOID_MOTORWAY.getModeValue(params.mode)){
specs.add(GeneralRouter.AVOID_MOTORWAY);
}
if(app.getSettings().AVOID_UNPAVED_ROADS.get()){
if(app.getSettings().AVOID_UNPAVED_ROADS.getModeValue(params.mode)){
specs.add(GeneralRouter.AVOID_UNPAVED);
}
String[] specialization = specs.toArray(new String[specs.size()]);