added Skiing to Application Base Modes
This commit is contained in:
parent
634205cac6
commit
ea01ea1d84
4 changed files with 14 additions and 7 deletions
|
@ -11,7 +11,7 @@
|
|||
Thx - Hardy
|
||||
|
||||
-->
|
||||
|
||||
<string name="base_profile_descr_ski">Skiing</string>
|
||||
<string name="select_icon_profile_dialog_title">Select icon</string>
|
||||
<string name="settings_routing_mode_string">Mode: %s</string>
|
||||
<string name="settings_derived_routing_mode_string">User Mode, derived from: %s</string>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<string name="select_base_profile_dialog_message">Custom Application Profile should be based on one of the default App Profiles. Selected Profile defines basic settings: setup of Widgets, units of speed and distance. In string below Profile\'s name, you could learn which Navigation Profiles are suitable for each Application Profile.</string>
|
||||
<string name="select_nav_profile_dialog_title">Select navigation type</string>
|
||||
<string name="base_profile_descr_car">Car, Truck, Motorcycle</string>
|
||||
<string name="base_profile_descr_bicycle">MBT, Moped, Skiing, Horse</string>
|
||||
<string name="base_profile_descr_bicycle">MTB, Moped, Horse</string>
|
||||
<string name="base_profile_descr_pedestrian">Walking, Hiking, Running</string>
|
||||
<string name="base_profile_descr_public_transport">All PT types</string>
|
||||
<string name="base_profile_descr_boat">Ship, Rowing, Sailing</string>
|
||||
|
@ -3155,6 +3155,7 @@
|
|||
<string name="run_full_osmand_header">Launch OsmAnd?</string>
|
||||
<string name="routing_attr_avoid_sett_name">Avoid cobblestone and sett</string>
|
||||
<string name="routing_attr_avoid_sett_description">Avoid cobblestone and sett</string>
|
||||
<string name="app_mode_skiing">Skiing</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -57,10 +57,13 @@ public class ApplicationMode {
|
|||
public static final ApplicationMode AIRCRAFT = create(R.string.app_mode_aircraft, "aircraft").speed(40f, 100).carLocation().
|
||||
icon(R.drawable.map_action_aircraft, R.drawable.ic_action_aircraft).setRouteService(RouteService.STRAIGHT).setRoutingProfile("STRAIGHT_LINE_MODE").reg();
|
||||
|
||||
public static final ApplicationMode SKI = create(R.string.app_mode_skiing, "ski").speed(5.5f, 15).arrivalDistance(60).offRouteDistance(50).bicycleLocation().
|
||||
icon(R.drawable.ic_plugin_skimaps, R.drawable.ic_plugin_skimaps).setRoutingProfile("ski").parent(BICYCLE).reg();
|
||||
|
||||
static {
|
||||
ApplicationMode[] exceptDefault = new ApplicationMode[]{CAR, PEDESTRIAN, BICYCLE, BOAT, AIRCRAFT, PUBLIC_TRANSPORT};
|
||||
ApplicationMode[] exceptPedestrianAndDefault = new ApplicationMode[]{CAR, BICYCLE, BOAT, AIRCRAFT, PUBLIC_TRANSPORT};
|
||||
ApplicationMode[] exceptAirBoatDefault = new ApplicationMode[]{CAR, BICYCLE, PEDESTRIAN};
|
||||
ApplicationMode[] exceptDefault = new ApplicationMode[]{CAR, PEDESTRIAN, BICYCLE, BOAT, AIRCRAFT, PUBLIC_TRANSPORT, SKI};
|
||||
ApplicationMode[] exceptPedestrianAndDefault = new ApplicationMode[]{CAR, BICYCLE, BOAT, AIRCRAFT, PUBLIC_TRANSPORT, SKI};
|
||||
ApplicationMode[] exceptAirBoatDefault = new ApplicationMode[]{CAR, BICYCLE, PEDESTRIAN, SKI};
|
||||
ApplicationMode[] pedestrian = new ApplicationMode[]{PEDESTRIAN};
|
||||
ApplicationMode[] pedestrianBicycle = new ApplicationMode[]{PEDESTRIAN, BICYCLE};
|
||||
|
||||
|
|
|
@ -158,7 +158,8 @@ public class SettingsProfileFragment extends BaseOsmAndFragment {
|
|||
PEDESTRIAN(R.string.base_profile_descr_pedestrian),
|
||||
PUBLIC_TRANSPORT(R.string.base_profile_descr_public_transport),
|
||||
BOAT(R.string.base_profile_descr_boat),
|
||||
AIRCRAFT(R.string.base_profile_descr_aircraft);
|
||||
AIRCRAFT(R.string.base_profile_descr_aircraft),
|
||||
SKI(R.string.base_profile_descr_ski);
|
||||
|
||||
private int descrRes;
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ public class RoutingOptionsHelper {
|
|||
addRouteMenuAppModes(ApplicationMode.PUBLIC_TRANSPORT, PermanentAppModeOptions.PUBLIC_TRANSPORT.routingParameters);
|
||||
addRouteMenuAppModes(ApplicationMode.BOAT, PermanentAppModeOptions.BOAT.routingParameters);
|
||||
addRouteMenuAppModes(ApplicationMode.AIRCRAFT, PermanentAppModeOptions.AIRCRAFT.routingParameters);
|
||||
addRouteMenuAppModes(ApplicationMode.SKI, PermanentAppModeOptions.SKI.routingParameters);
|
||||
}
|
||||
|
||||
private void addRouteMenuAppModes(ApplicationMode am, List<String> routingParameters) {
|
||||
|
@ -966,7 +967,8 @@ public class RoutingOptionsHelper {
|
|||
PEDESTRIAN(MuteSoundRoutingParameter.KEY, GeneralRouter.USE_HEIGHT_OBSTACLES),
|
||||
PUBLIC_TRANSPORT(MuteSoundRoutingParameter.KEY, AvoidPTTypesRoutingParameter.KEY),
|
||||
BOAT(MuteSoundRoutingParameter.KEY),
|
||||
AIRCRAFT(MuteSoundRoutingParameter.KEY);
|
||||
AIRCRAFT(MuteSoundRoutingParameter.KEY),
|
||||
SKI(MuteSoundRoutingParameter.KEY, DRIVING_STYLE, GeneralRouter.USE_HEIGHT_OBSTACLES);
|
||||
|
||||
List<String> routingParameters;
|
||||
|
||||
|
|
Loading…
Reference in a new issue