Merge branch 'master' into straight_to

This commit is contained in:
MadWasp79 2020-02-11 12:49:37 +02:00
commit 39e6132d83
5 changed files with 39 additions and 12 deletions

View file

@ -0,0 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M7,4V20"
android:strokeAlpha="0.5"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#727272"
android:fillAlpha="0.5"/>
<path
android:pathData="M7,6C8.1046,6 9,5.1046 9,4C9,2.8954 8.1046,2 7,2C5.8954,2 5,2.8954 5,4C5,5.1046 5.8954,6 7,6ZM7,22C8.1046,22 9,21.1046 9,20C9,18.8954 8.1046,18 7,18C5.8954,18 5,18.8954 5,20C5,21.1046 5.8954,22 7,22Z"
android:fillColor="#727272"
android:fillType="evenOdd"/>
<path
android:pathData="M16,6L13,9V18L16,15V6Z"
android:fillColor="#727272"
android:fillType="evenOdd"/>
<path
android:pathData="M16,15L19,18V9L16,6V15Z"
android:strokeAlpha="0.8"
android:fillColor="#727272"
android:fillType="evenOdd"
android:fillAlpha="0.8"/>
</vector>

View file

@ -11,7 +11,7 @@
Thx - Hardy
-->
<string name="routing_profile_straight_to">Straight to point routing</string>
<string name="routing_profile_direct_to">Direct to point routing</string>
<string name="release_3_6">
• Profiles: now you can change order, set icon for map, change all setting for base profiles and restore them back to defaults\n\n
• Added exit number in the navigation\n\n

View file

@ -20,7 +20,7 @@ public class RoutingProfileDataObject extends ProfileDataObject {
}
public enum RoutingProfilesResources {
STRAIGHT_TO_LINE_MODE(R.string.routing_profile_straight_to, R.drawable.ic_action_split_interval),
DIRECT_TO_MODE(R.string.routing_profile_direct_to, R.drawable.ic_action_navigation_type_direct_to),
STRAIGHT_LINE_MODE(R.string.routing_profile_straightline, R.drawable.ic_action_split_interval),
BROUTER_MODE(R.string.routing_profile_broutrer, R.drawable.ic_action_split_interval),
CAR(R.string.rendering_value_car_name, R.drawable.ic_action_car_dark),

View file

@ -80,7 +80,7 @@ public class RouteProvider {
OSMAND("OsmAnd (offline)"),
BROUTER("BRouter (offline)"),
STRAIGHT("Straight line"),
STRAIGHT_TO("Straight To");
DIRECT_TO("Direct To");
private final String name;
@ -318,8 +318,8 @@ public class RouteProvider {
// res = findOSRMRoute(params);
} else if (params.mode.getRouteService() == RouteService.STRAIGHT) {
res = findStraightRoute(params);
} else if (params.mode.getRouteService() == RouteService.STRAIGHT_TO) {
res = findStraightTo(params);
} else if (params.mode.getRouteService() == RouteService.DIRECT_TO) {
res = findDirectTo(params);
} else {
res = new RouteCalculationResult("Selected route service is not available");
}
@ -1260,7 +1260,7 @@ public class RouteProvider {
return new RouteCalculationResult(dots, null, params, null, true);
}
private RouteCalculationResult findStraightTo(RouteCalculationParams params) {
private RouteCalculationResult findDirectTo(RouteCalculationParams params) {
params.showOriginalRoute = true;
double[] lats = new double[] { params.start.getLatitude(), params.end.getLatitude() };
double[] lons = new double[] { params.start.getLongitude(), params.end.getLongitude() };

View file

@ -157,8 +157,8 @@ public class NavigationFragment extends BaseSettingsFragment {
RouteProvider.RouteService routeService;
if (profileKey.equals(RoutingProfilesResources.STRAIGHT_LINE_MODE.name())) {
routeService = RouteProvider.RouteService.STRAIGHT;
} else if (profileKey.equals(RoutingProfilesResources.STRAIGHT_TO_LINE_MODE.name())){
routeService = RouteProvider.RouteService.STRAIGHT_TO;
} else if (profileKey.equals(RoutingProfilesResources.DIRECT_TO_MODE.name())){
routeService = RouteProvider.RouteService.DIRECT_TO;
} else if (profileKey.equals(RoutingProfilesResources.BROUTER_MODE.name())) {
routeService = RouteProvider.RouteService.BROUTER;
} else {
@ -211,11 +211,11 @@ public class NavigationFragment extends BaseSettingsFragment {
context.getString(R.string.special_routing_type),
RoutingProfilesResources.STRAIGHT_LINE_MODE.getIconRes(),
false, null));
profilesObjects.put(RoutingProfilesResources.STRAIGHT_TO_LINE_MODE.name(), new RoutingProfileDataObject(
RoutingProfilesResources.STRAIGHT_TO_LINE_MODE.name(),
context.getString(RoutingProfilesResources.STRAIGHT_TO_LINE_MODE.getStringRes()),
profilesObjects.put(RoutingProfilesResources.DIRECT_TO_MODE.name(), new RoutingProfileDataObject(
RoutingProfilesResources.DIRECT_TO_MODE.name(),
context.getString(RoutingProfilesResources.DIRECT_TO_MODE.getStringRes()),
context.getString(R.string.special_routing_type),
RoutingProfilesResources.STRAIGHT_TO_LINE_MODE.getIconRes(),
RoutingProfilesResources.DIRECT_TO_MODE.getIconRes(),
false, null));
if (context.getBRouterService() != null) {
profilesObjects.put(RoutingProfilesResources.BROUTER_MODE.name(), new RoutingProfileDataObject(