add max width parameter
This commit is contained in:
parent
25371bc5a6
commit
a6c985043d
4 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,7 @@ public class GeneralRouter implements VehicleRouter {
|
|||
public static final String MAX_SPEED = "max_speed";
|
||||
public static final String VEHICLE_HEIGHT = "height";
|
||||
public static final String VEHICLE_WEIGHT = "weight";
|
||||
public static final String VEHICLE_WIDTH = "width";
|
||||
|
||||
private final RouteAttributeContext[] objectAttributes;
|
||||
public final Map<String, String> attributes;
|
||||
|
|
|
@ -1916,6 +1916,8 @@
|
|||
<string name="routing_attr_avoid_borders_description">Avoid crossing national borders</string>
|
||||
<string name="routing_attr_weight_name">Weight limit</string>
|
||||
<string name="routing_attr_weight_description">Specify permitted vehicle weight limit on routes.</string>
|
||||
<string name="routing_attr_width_name">Width limit</string>
|
||||
<string name="routing_attr_width_description">Specify permitted vehicle width limit on routes.</string>
|
||||
<string name="routing_attr_height_name">Height limit</string>
|
||||
<string name="routing_attr_height_description">Specify vehicle height to be permitted on routes.</string>
|
||||
<string name="android_19_location_disabled">Since Android version 4.4 (KitKat) you cannot download and update maps to the old storage folder (%s). Copy all OsmAnd files to new storage location?
|
||||
|
|
|
@ -133,6 +133,7 @@ public class RouteParametersFragment extends BaseSettingsFragment {
|
|||
} else if (!param.equals(GeneralRouter.USE_SHORTEST_WAY)
|
||||
&& !param.equals(GeneralRouter.VEHICLE_HEIGHT)
|
||||
&& !param.equals(GeneralRouter.VEHICLE_WEIGHT)
|
||||
&& !param.equals(GeneralRouter.VEHICLE_WIDTH)
|
||||
&& !RoutingOptionsHelper.DRIVING_STYLE.equals(routingParameter.getGroup())) {
|
||||
otherRoutingParameters.add(routingParameter);
|
||||
}
|
||||
|
|
|
@ -46,6 +46,10 @@ public class VehicleParametersFragment extends BaseSettingsFragment {
|
|||
if (vehicleWeight != null) {
|
||||
setupCustomRoutingPropertyPref(vehicleWeight);
|
||||
}
|
||||
GeneralRouter.RoutingParameter vehicleWidth = parameters.get(GeneralRouter.VEHICLE_WIDTH);
|
||||
if (vehicleWidth != null) {
|
||||
setupCustomRoutingPropertyPref(vehicleWidth);
|
||||
}
|
||||
if (router.getProfile() != GeneralRouter.GeneralRouterProfile.PUBLIC_TRANSPORT) {
|
||||
setupDefaultSpeedPref();
|
||||
}
|
||||
|
@ -111,6 +115,8 @@ public class VehicleParametersFragment extends BaseSettingsFragment {
|
|||
return getIcon(R.drawable.ic_action_height_limit);
|
||||
case GeneralRouter.VEHICLE_WEIGHT:
|
||||
return getIcon(R.drawable.ic_action_weight_limit);
|
||||
case GeneralRouter.VEHICLE_WIDTH:
|
||||
return getIcon(R.drawable.ic_action_width_limit);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue