Merge branch 'conditionalRouting'
This commit is contained in:
commit
068f36a2ec
2 changed files with 5 additions and 2 deletions
|
@ -1222,8 +1222,9 @@ public class OsmandSettings {
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
public final OsmandPreference<Boolean> FAST_ROUTE_MODE = new BooleanPreference("fast_route_mode", true).makeProfile();
|
public final OsmandPreference<Boolean> FAST_ROUTE_MODE = new BooleanPreference("fast_route_mode", true).makeProfile();
|
||||||
// temporarily for new version
|
// dev version
|
||||||
public final CommonPreference<Boolean> DISABLE_COMPLEX_ROUTING = new BooleanPreference("disable_complex_routing", false).makeGlobal();
|
public final CommonPreference<Boolean> DISABLE_COMPLEX_ROUTING = new BooleanPreference("disable_complex_routing", false).makeGlobal();
|
||||||
|
public final CommonPreference<Boolean> ENABLE_TIME_CONDITIONAL_ROUTING = new BooleanPreference("enable_time_conditional_routing", true).makeGlobal();
|
||||||
|
|
||||||
public final CommonPreference<Boolean> SHOW_TRAFFIC_WARNINGS = new BooleanPreference("show_traffic_warnings", false).makeProfile().cache();
|
public final CommonPreference<Boolean> SHOW_TRAFFIC_WARNINGS = new BooleanPreference("show_traffic_warnings", false).makeProfile().cache();
|
||||||
|
|
||||||
|
|
|
@ -712,7 +712,6 @@ public class RouteProvider {
|
||||||
if (maxSpeed > 0) {
|
if (maxSpeed > 0) {
|
||||||
paramsR.put(GeneralRouter.MAX_SPEED, String.valueOf(maxSpeed));
|
paramsR.put(GeneralRouter.MAX_SPEED, String.valueOf(maxSpeed));
|
||||||
}
|
}
|
||||||
|
|
||||||
float mb = (1 << 20);
|
float mb = (1 << 20);
|
||||||
Runtime rt = Runtime.getRuntime();
|
Runtime rt = Runtime.getRuntime();
|
||||||
// make visible
|
// make visible
|
||||||
|
@ -721,6 +720,9 @@ public class RouteProvider {
|
||||||
RoutingConfiguration cf = config.build( params.mode.getRoutingProfile(), params.start.hasBearing() ?
|
RoutingConfiguration cf = config.build( params.mode.getRoutingProfile(), params.start.hasBearing() ?
|
||||||
params.start.getBearing() / 180d * Math.PI : null,
|
params.start.getBearing() / 180d * Math.PI : null,
|
||||||
memoryLimit, paramsR);
|
memoryLimit, paramsR);
|
||||||
|
if(settings.ENABLE_TIME_CONDITIONAL_ROUTING.get()) {
|
||||||
|
cf.routeCalculationTime = System.currentTimeMillis();
|
||||||
|
}
|
||||||
return cf;
|
return cf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue