Fix #8304
This commit is contained in:
parent
e59e235c6d
commit
973fc013aa
1 changed files with 5 additions and 6 deletions
|
@ -138,9 +138,6 @@ public class GeneralRouter implements VehicleRouter {
|
||||||
allowPrivate = params.containsKey(ALLOW_PRIVATE) && parseSilentBoolean(params.get(ALLOW_PRIVATE), false);
|
allowPrivate = params.containsKey(ALLOW_PRIVATE) && parseSilentBoolean(params.get(ALLOW_PRIVATE), false);
|
||||||
shortestRoute = params.containsKey(USE_SHORTEST_WAY) && parseSilentBoolean(params.get(USE_SHORTEST_WAY), false);
|
shortestRoute = params.containsKey(USE_SHORTEST_WAY) && parseSilentBoolean(params.get(USE_SHORTEST_WAY), false);
|
||||||
heightObstacles = params.containsKey(USE_HEIGHT_OBSTACLES) && parseSilentBoolean(params.get(USE_HEIGHT_OBSTACLES), false);
|
heightObstacles = params.containsKey(USE_HEIGHT_OBSTACLES) && parseSilentBoolean(params.get(USE_HEIGHT_OBSTACLES), false);
|
||||||
if(shortestRoute) {
|
|
||||||
maxSpeed = Math.min(CAR_SHORTEST_DEFAULT_SPEED, maxSpeed);
|
|
||||||
}
|
|
||||||
if (params.containsKey(DEFAULT_SPEED)) {
|
if (params.containsKey(DEFAULT_SPEED)) {
|
||||||
defaultSpeed = parseSilentFloat(params.get(DEFAULT_SPEED), defaultSpeed);
|
defaultSpeed = parseSilentFloat(params.get(DEFAULT_SPEED), defaultSpeed);
|
||||||
}
|
}
|
||||||
|
@ -150,8 +147,10 @@ public class GeneralRouter implements VehicleRouter {
|
||||||
if (params.containsKey(MAX_SPEED)) {
|
if (params.containsKey(MAX_SPEED)) {
|
||||||
maxSpeed = parseSilentFloat(params.get(MAX_SPEED), maxSpeed);
|
maxSpeed = parseSilentFloat(params.get(MAX_SPEED), maxSpeed);
|
||||||
}
|
}
|
||||||
|
if (shortestRoute) {
|
||||||
|
maxSpeed = Math.min(CAR_SHORTEST_DEFAULT_SPEED, maxSpeed);
|
||||||
|
}
|
||||||
initCaches();
|
initCaches();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GeneralRouter(GeneralRouterProfile profile, Map<String, String> attributes) {
|
public GeneralRouter(GeneralRouterProfile profile, Map<String, String> attributes) {
|
||||||
|
|
Loading…
Reference in a new issue