From a9915e7e82242ffb8d93071773ffa560805ab18f Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Wed, 12 Feb 2020 16:44:02 +0200 Subject: [PATCH 001/120] Direct to: show projection point only on certain distance from location marker. Direct to: prevent route recalculations. --- .../plus/routing/RouteCalculationParams.java | 1 + .../plus/routing/RouteCalculationResult.java | 3 +- .../osmand/plus/routing/RouteProvider.java | 1 + .../osmand/plus/routing/RoutingHelper.java | 9 ++-- .../src/net/osmand/plus/views/RouteLayer.java | 48 +++++++++++-------- 5 files changed, 36 insertions(+), 26 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java index 99d7c6a959..50294d5cbe 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java @@ -35,6 +35,7 @@ public class RouteCalculationParams { public RouteCalculationResultListener resultListener; public boolean showOriginalRoute; + public boolean noRecalculations; public interface RouteCalculationResultListener { void onRouteCalculated(RouteCalculationResult route); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 1c838ec327..56c15fa45d 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -63,7 +63,7 @@ public class RouteCalculationResult { protected int currentWaypointGPX = 0; protected int lastWaypointGPX = 0; protected ApplicationMode appMode; - + protected boolean noRecalculations = false; protected boolean showOriginalRoute = false; public RouteCalculationResult(String errorMessage) { @@ -113,6 +113,7 @@ public class RouteCalculationResult { updateDirectionsTime(this.directions, this.listDistance); this.showOriginalRoute = params.showOriginalRoute; + this.noRecalculations = params.noRecalculations; } public RouteCalculationResult(List list, Location start, LatLon end, List intermediates, diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index f24a47851a..99ad7baa3a 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -1262,6 +1262,7 @@ public class RouteProvider { private RouteCalculationResult findDirectTo(RouteCalculationParams params) { params.showOriginalRoute = true; + params.noRecalculations = true; double[] lats = new double[] { params.start.getLatitude(), params.end.getLatitude() }; double[] lons = new double[] { params.start.getLongitude(), params.end.getLongitude() }; List intermediates = params.intermediates; diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 1e829f7abd..e1fc5ab809 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -437,7 +437,7 @@ public class RoutingHelper { // 2. Analyze if we need to recalculate route // >100m off current route (sideways) - if (currentRoute > 0) { + if (currentRoute > 0 && !route.noRecalculations) { distOrth = getOrthogonalDistance(currentLocation, routeNodes.get(currentRoute - 1), routeNodes.get(currentRoute)); if ((!settings.DISABLE_OFFROUTE_RECALC.get()) && (distOrth > (1.7 * posTolerance))) { log.info("Recalculate route, because correlation : " + distOrth); //$NON-NLS-1$ @@ -448,7 +448,8 @@ public class RoutingHelper { // 3. Identify wrong movement direction Location next = route.getNextRouteLocation(); boolean wrongMovementDirection = checkWrongMovementDirection(currentLocation, next); - if ((!settings.DISABLE_WRONG_DIRECTION_RECALC.get()) && wrongMovementDirection && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > (2 * posTolerance))) { + if ((!settings.DISABLE_WRONG_DIRECTION_RECALC.get()) && wrongMovementDirection + && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > (2 * posTolerance)) && !route.noRecalculations) { log.info("Recalculate route, because wrong movement direction: " + currentLocation.distanceTo(routeNodes.get(currentRoute))); //$NON-NLS-1$ isDeviatedFromRoute = true; calculateRoute = true; @@ -464,11 +465,11 @@ public class RoutingHelper { if (!inRecalc && !wrongMovementDirection) { voiceRouter.updateStatus(currentLocation, false); voiceRouterStopped = false; - } else if (isDeviatedFromRoute && !voiceRouterStopped) { + } else if (isDeviatedFromRoute && !voiceRouterStopped && !route.noRecalculations) { voiceRouter.interruptRouteCommands(); voiceRouterStopped = true; // Prevents excessive execution of stop() code } - if (distOrth > mode.getOffRouteDistance()) { + if (distOrth > mode.getOffRouteDistance() && !route.noRecalculations) { voiceRouter.announceOffRoute(distOrth); } } diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 97b22822b4..2c7ea7be68 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -17,6 +17,7 @@ import android.support.annotation.Nullable; import android.support.v4.content.ContextCompat; import android.util.Pair; +import net.osmand.AndroidUtils; import net.osmand.Location; import net.osmand.PlatformUtil; import net.osmand.data.LatLon; @@ -315,7 +316,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont } } - private void drawProjectionPoint(RotatedTileBox box, Canvas canvas, double[] projectionXY) { + private void drawProjectionPoint(Canvas canvas, double[] projectionXY) { if (projectionIcon == null) { projectionIcon = (LayerDrawable) view.getResources().getDrawable(helper.getSettings().getApplicationMode().getLocationIcon().getIconId()); } @@ -1120,16 +1121,16 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont } if (helper.getRoute().isShowOriginalRoute()) { //add projection point on original route - double[] projectionOnRoute = calculateProjectionOnRoutePoint(helper.getLastProjection(), + double[] projectionOnRoute = calculateProjectionOnRoutePoint( helper.getOriginalRouteAllLoc(), helper, tb); if (projectionOnRoute != null) { - drawProjectionPoint(tb, canvas, projectionOnRoute); + drawProjectionPoint(canvas, projectionOnRoute); } } } } - private double[] calculateProjectionOnRoutePoint(Location lastProjection, List routeNodes, RoutingHelper helper, RotatedTileBox box) { + private double[] calculateProjectionOnRoutePoint(List routeNodes, RoutingHelper helper, RotatedTileBox box) { double[] projectionXY; boolean visible; Location previousInRoute = null; @@ -1148,25 +1149,30 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont nextInRoute = routeNodes.get(routeNodes.size() - 1); } - int centerX = box.getPixXFromLonNoRot(nextInRoute.getLongitude()); - int centerY = box.getPixYFromLatNoRot(nextInRoute.getLatitude()); - int aX = box.getPixXFromLonNoRot(lastProjection.getLongitude()); - int aY = box.getPixYFromLatNoRot(lastProjection.getLatitude()); - int bX = box.getPixXFromLonNoRot(previousInRoute.getLongitude()); - int bY = box.getPixYFromLatNoRot(previousInRoute.getLatitude()); + if (nextInRoute != null && previousInRoute != null) { + final Location ll = view.getApplication().getLocationProvider().getLastKnownLocation(); + final int aX = box.getPixXFromLonNoRot(ll.getLongitude()); + final int aY = box.getPixYFromLatNoRot(ll.getLatitude()); + final int centerX = box.getPixXFromLonNoRot(nextInRoute.getLongitude()); + final int centerY = box.getPixYFromLatNoRot(nextInRoute.getLatitude()); + final int bX = box.getPixXFromLonNoRot(previousInRoute.getLongitude()); + final int bY = box.getPixYFromLatNoRot(previousInRoute.getLatitude()); - double radius = MapUtils.getVectorMagnitude(centerX, centerY, aX, aY); - double angle2 = MapUtils.getAngleForRadiusVector(centerX, centerY, bX, bY); - projectionXY = MapUtils.getCoordinatesFromRadiusAndAngle(centerX, centerY, radius, angle2); - visible = box.containsPoint((float)projectionXY[0], (float)projectionXY[1], 20.0f) - && Math.abs(Math.toDegrees(MapUtils.getAngleBetweenVectors(centerX, centerY, aX, aY, centerX, centerY, bX, bY))) < 90; - - if (visible) { - return projectionXY; - } else { - return null; + double radius = MapUtils.getVectorMagnitude(centerX, centerY, aX, aY); + double angle2 = MapUtils.getAngleForRadiusVector(centerX, centerY, bX, bY); + projectionXY = MapUtils.getCoordinatesFromRadiusAndAngle(centerX, centerY, radius, angle2); + double distanceLoc2Proj = MapUtils.getVectorMagnitude(aX, aY, (int)projectionXY[0], (int)projectionXY[1]); + boolean isProjectionOnSegment = MapUtils.getVectorMagnitude(centerX ,centerY, (int) projectionXY[0], (int) projectionXY[1]) + < MapUtils.getVectorMagnitude(centerX, centerY, bX, bY); + visible = box.containsPoint((float)projectionXY[0], (float)projectionXY[1], 20.0f) + && Math.abs(Math.toDegrees(MapUtils.getAngleBetweenVectors(centerX, centerY, aX, aY, centerX, centerY, bX, bY))) < 90 + && distanceLoc2Proj > AndroidUtils.dpToPx(view.getContext(), 52) / 2.0 + && isProjectionOnSegment; + if (visible) { + return projectionXY; + } } - + return null; } private List calculateActionPoints(double topLatitude, double leftLongitude, double bottomLatitude, From 989f118fb6d4590c3fb10bd1da74ff087bb8f434 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Wed, 12 Feb 2020 21:43:20 +0200 Subject: [PATCH 002/120] add setting for min recaclulation distance for Straight line routing --- OsmAnd/res/values/strings.xml | 2 ++ .../src/net/osmand/plus/OsmandSettings.java | 2 ++ .../plus/routing/RouteCalculationParams.java | 1 + .../plus/routing/RouteCalculationResult.java | 2 ++ .../settings/RouteParametersFragment.java | 20 +++++++++++++++++++ 5 files changed, 27 insertions(+) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index abf0c5d13d..9c83b649af 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,8 @@ Thx - Hardy --> + Minimal distance to recalculate + Minimal distance of deviation from route to start recalculation Direct-to-point Clear recorded data diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 4a8540f633..885e2afde4 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3282,6 +3282,8 @@ public class OsmandSettings { return customBooleanRoutingProps.get(attrName); } + public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 10.f).makeProfile(); + public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference("enable_osmc_routing", true).makeGlobal(); public final OsmandPreference USE_OSM_LIVE_FOR_PUBLIC_TRANSPORT = new BooleanPreference("enable_osmc_public_transport", false).makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java index 50294d5cbe..f1b950d1f6 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java @@ -36,6 +36,7 @@ public class RouteCalculationParams { public boolean showOriginalRoute; public boolean noRecalculations; + public float routeRecalculationDistance; public interface RouteCalculationResultListener { void onRouteCalculated(RouteCalculationResult route); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 56c15fa45d..a3972ecbd2 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -65,6 +65,7 @@ public class RouteCalculationResult { protected ApplicationMode appMode; protected boolean noRecalculations = false; protected boolean showOriginalRoute = false; + protected float routeRecalcDistance = 10.f; public RouteCalculationResult(String errorMessage) { this.errorMessage = errorMessage; @@ -114,6 +115,7 @@ public class RouteCalculationResult { this.showOriginalRoute = params.showOriginalRoute; this.noRecalculations = params.noRecalculations; + this.routeRecalcDistance = params.routeRecalculationDistance; } public RouteCalculationResult(List list, Location start, LatLon end, List intermediates, diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 43ff4efddc..9a92fbcbc9 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -7,6 +7,7 @@ import android.support.v4.content.ContextCompat; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceScreen; import android.support.v7.preference.PreferenceViewHolder; +import android.text.SpannableStringBuilder; import android.widget.ImageView; import net.osmand.StateChangedListener; @@ -136,9 +137,13 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP fastRoute.setSummaryOn(R.string.shared_string_on); fastRoute.setSummaryOff(R.string.shared_string_off); + ApplicationMode am = getSelectedAppMode(); if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); + if (am.getRouteService() == RouteProvider.RouteService.STRAIGHT) { + setupSelectRouteRecalcDistance(screen); + } } else { GeneralRouter router = getRouter(getMyApplication().getRoutingConfig(), am); clearParameters(); @@ -228,6 +233,21 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } } + private void setupSelectRouteRecalcDistance(PreferenceScreen screen) { + Float[] entryValues = new Float[] {10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f}; + String[] entries = new String[entryValues.length]; + entries[0] = getString(R.string.shared_string_not_selected); + for (int i = 1; i < entryValues.length; i++) { + entries[i] = entryValues[i].intValue() + " " + getString(R.string.m) + " (" + Math.round(entryValues[i] / 0.3048f) + " " + getString(R.string.foot) + ")"; + } + ListPreferenceEx routeRecalculationDist = createListPreferenceEx(settings.ROUTE_RECALCULATION_DISTANCE.getId(), + entries, entryValues, R.string.route_recalculation_dist_title, R.layout.preference_with_descr); + routeRecalculationDist.setEntries(entries); + routeRecalculationDist.setEntryValues(entryValues); + routeRecalculationDist.setDescription(getString(R.string.route_recalculation_dist_descr)); + screen.addPreference(routeRecalculationDist); + } + @Override public void onResume() { super.onResume(); From 38e935fb96f49d2cdd5ee65b5d20c95c36c054fd Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Thu, 13 Feb 2020 16:37:13 +0200 Subject: [PATCH 003/120] fix settings formatting calculate pointToReturn on track. --- OsmAnd/res/values/strings.xml | 4 +-- .../src/net/osmand/plus/OsmandSettings.java | 2 +- .../plus/routing/RouteCalculationResult.java | 7 +++- .../osmand/plus/routing/RoutingHelper.java | 21 ++++++++---- .../settings/RouteParametersFragment.java | 5 +-- .../src/net/osmand/plus/views/RouteLayer.java | 32 ++++++++++++++++--- 6 files changed, 54 insertions(+), 17 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 3960a5a6a5..eb228b12e5 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,8 +11,8 @@ Thx - Hardy --> - Minimal distance to recalculate - Minimal distance of deviation from route to start recalculation + Minimal distance to recalculate route + The route will be recalculated if the distance to the route is longer than specified parameter Direct-to-point Clear recorded data diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index b8f782aeaa..6cb2b76218 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3282,7 +3282,7 @@ public class OsmandSettings { return customBooleanRoutingProps.get(attrName); } - public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 10.f).makeProfile(); + public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", -1.f).makeProfile(); public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference("enable_osmc_routing", true).makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index a3972ecbd2..4b71d4cbec 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -65,7 +65,7 @@ public class RouteCalculationResult { protected ApplicationMode appMode; protected boolean noRecalculations = false; protected boolean showOriginalRoute = false; - protected float routeRecalcDistance = 10.f; + protected float routeRecalcDistance = -1f; public RouteCalculationResult(String errorMessage) { this.errorMessage = errorMessage; @@ -115,6 +115,7 @@ public class RouteCalculationResult { this.showOriginalRoute = params.showOriginalRoute; this.noRecalculations = params.noRecalculations; + if (params.routeRecalculationDistance != 0) this.routeRecalcDistance = params.routeRecalculationDistance; } @@ -236,6 +237,10 @@ public class RouteCalculationResult { } } + public float getRouteRecalcDistance() { + return routeRecalcDistance; + } + public List getOriginalRoute() { if (segments.size() == 0) { return null; diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index e1fc5ab809..0413c198ba 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -398,6 +398,13 @@ public class RoutingHelper { return getOrthogonalDistance(lastFixedLocation, routeNodes.get(route.currentRoute -1), routeNodes.get(route.currentRoute)); } + public float getPosTolerance(Location currentLocation) { + if(currentLocation.hasAccuracy()) { + return POSITION_TOLERANCE / 2 + currentLocation.getAccuracy(); + } + return POSITION_TOLERANCE; + } + private Location setCurrentLocation(Location currentLocation, boolean returnUpdatedLocation, RouteCalculationResult previousRoute, boolean targetPointsChanged) { Location locationProjection = currentLocation; @@ -413,10 +420,7 @@ public class RoutingHelper { isDeviatedFromRoute = false; return locationProjection; } - float posTolerance = POSITION_TOLERANCE; - if(currentLocation.hasAccuracy()) { - posTolerance = POSITION_TOLERANCE / 2 + currentLocation.getAccuracy(); - } + float posTolerance = getPosTolerance(currentLocation); boolean calculateRoute = false; synchronized (this) { isDeviatedFromRoute = false; @@ -436,10 +440,11 @@ public class RoutingHelper { int currentRoute = route.currentRoute; // 2. Analyze if we need to recalculate route - // >100m off current route (sideways) + // >100m off current route (sideways) or parameter (for Straight line) if (currentRoute > 0 && !route.noRecalculations) { + double allowableDeviation = route.routeRecalcDistance <= 0 ? (1.7 * posTolerance) : route.routeRecalcDistance; distOrth = getOrthogonalDistance(currentLocation, routeNodes.get(currentRoute - 1), routeNodes.get(currentRoute)); - if ((!settings.DISABLE_OFFROUTE_RECALC.get()) && (distOrth > (1.7 * posTolerance))) { + if ((!settings.DISABLE_OFFROUTE_RECALC.get()) && (distOrth > allowableDeviation)) { log.info("Recalculate route, because correlation : " + distOrth); //$NON-NLS-1$ isDeviatedFromRoute = true; calculateRoute = true; @@ -448,8 +453,9 @@ public class RoutingHelper { // 3. Identify wrong movement direction Location next = route.getNextRouteLocation(); boolean wrongMovementDirection = checkWrongMovementDirection(currentLocation, next); + double allowableDeviation = route.routeRecalcDistance <= 0 ? (2 * posTolerance) : route.routeRecalcDistance; if ((!settings.DISABLE_WRONG_DIRECTION_RECALC.get()) && wrongMovementDirection - && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > (2 * posTolerance)) && !route.noRecalculations) { + && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > allowableDeviation) && !route.noRecalculations) { log.info("Recalculate route, because wrong movement direction: " + currentLocation.distanceTo(routeNodes.get(currentRoute))); //$NON-NLS-1$ isDeviatedFromRoute = true; calculateRoute = true; @@ -1099,6 +1105,7 @@ public class RoutingHelper { params.fast = settings.FAST_ROUTE_MODE.getModeValue(mode); params.mode = mode; params.ctx = app; + params.routeRecalculationDistance = settings.ROUTE_RECALCULATION_DISTANCE.getModeValue(mode); boolean updateProgress = false; if (params.mode.getRouteService() == RouteService.OSMAND) { params.calculationProgress = new RouteCalculationProgress(); diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 9a92fbcbc9..47a0b0fdf0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -12,6 +12,7 @@ import android.widget.ImageView; import net.osmand.StateChangedListener; import net.osmand.plus.ApplicationMode; +import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings.BooleanPreference; @@ -234,11 +235,11 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } private void setupSelectRouteRecalcDistance(PreferenceScreen screen) { - Float[] entryValues = new Float[] {10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f}; + Float[] entryValues = new Float[] {-1.0f, 10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f}; String[] entries = new String[entryValues.length]; entries[0] = getString(R.string.shared_string_not_selected); for (int i = 1; i < entryValues.length; i++) { - entries[i] = entryValues[i].intValue() + " " + getString(R.string.m) + " (" + Math.round(entryValues[i] / 0.3048f) + " " + getString(R.string.foot) + ")"; + entries[i] = OsmAndFormatter.getFormattedDistance(entryValues[i], app, false); } ListPreferenceEx routeRecalculationDist = createListPreferenceEx(settings.ROUTE_RECALCULATION_DISTANCE.getId(), entries, entryValues, R.string.route_recalculation_dist_title, R.layout.preference_with_descr); diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 2c7ea7be68..f621951805 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -952,7 +952,8 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont } private void drawSegments(RotatedTileBox tb, Canvas canvas, double topLatitude, double leftLongitude, - double bottomLatitude, double rightLongitude, Location lastProjection, int currentRoute, boolean showOriginalRoute) { + double bottomLatitude, double rightLongitude, Location lastProjection, int currentRoute, boolean showOriginalRoute, + Location pointToReturn) { if (locations.size() == 0) { return; } @@ -966,6 +967,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont new GeometrySolidWayStyle(wayContext, attrs.paint.getColor()); GeometryWayStyle style = defaultWayStyle; boolean previousVisible = false; + if (lastProjection != null) { if (leftLongitude <= lastProjection.getLongitude() && lastProjection.getLongitude() <= rightLongitude && bottomLatitude <= lastProjection.getLatitude() && lastProjection.getLatitude() <= topLatitude) { @@ -1099,7 +1101,8 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont Location startLocation = new Location("transport"); startLocation.setLatitude(start.getLatitude()); startLocation.setLongitude(start.getLongitude()); - routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, startLocation, 0, false); + routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, + startLocation, 0, false, null); } } else { RouteCalculationResult route = helper.getRoute(); @@ -1107,10 +1110,31 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont routeGeometry.updateRoute(tb, route); if (helper.getRoute().isShowOriginalRoute() && helper.getOriginalStartingLocation() != null) { routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, - helper.getOriginalStartingLocation(), 0, true); + helper.getOriginalStartingLocation(), 0, true, null); } else { + Location currentLoc = helper.getLastProjection(); + int currentRoute = route == null ? 0 : route.getCurrentRoute(); + Location pointToReturn = null; + if (route != null && currentRoute > 0 && route.getRouteRecalcDistance() > 0) { + final Location from = routeGeometry.locations.get(currentRoute - 1); + final Location to = routeGeometry.locations.get(currentRoute); + final LatLon projection = MapUtils.getProjection(currentLoc.getLatitude(), + currentLoc.getLongitude(), from.getLatitude(), from.getLongitude(), + to.getLatitude(), to.getLongitude()); + + final double deviation = MapUtils.getDistance(projection.getLatitude(), projection.getLongitude(), currentLoc.getLatitude(), currentLoc.getLongitude()); + if (deviation < route.getRouteRecalcDistance()) { + double distFromProjectionToEnd = Math.sqrt(Math.pow(to.getLatitude() - projection.getLatitude(), 2) + Math.pow(to.getLongitude() - projection.getLongitude(), 2)); + double coef = deviation / distFromProjectionToEnd; + pointToReturn = new Location("route_layer"); + pointToReturn.setLatitude(projection.getLatitude() + (to.getLatitude() - projection.getLatitude()) * coef); + pointToReturn.setLongitude(projection.getLongitude() + (to.getLongitude() - projection.getLatitude()) * coef); + //how to draw line to this point from lastProjection?! + } + } + routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, - helper.getLastProjection(), route == null ? 0 : route.getCurrentRoute(), false); + helper.getLastProjection(), route == null ? 0 : route.getCurrentRoute(), false, pointToReturn); } List rd = helper.getRouteDirections(); Iterator it = rd.iterator(); From a9b9bceea40e8d36125d3d11f5ae6d62e75ca382 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Thu, 13 Feb 2020 16:41:40 +0200 Subject: [PATCH 004/120] add icon to settings --- .../src/net/osmand/plus/settings/RouteParametersFragment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 47a0b0fdf0..70d393d3d6 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -246,6 +246,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP routeRecalculationDist.setEntries(entries); routeRecalculationDist.setEntryValues(entryValues); routeRecalculationDist.setDescription(getString(R.string.route_recalculation_dist_descr)); + routeRecalculationDist.setIcon(getRoutingPrefIcon("routing_recalc_distance")); screen.addPreference(routeRecalculationDist); } @@ -423,6 +424,9 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP return getPersistentPrefIcon(R.drawable.ic_action_fastest_route); case "enable_time_conditional_routing": return getPersistentPrefIcon(R.drawable.ic_action_road_works_dark); + case "routing_recalc_distance": + return getPersistentPrefIcon(R.drawable.ic_action_minimal_distance); + default: return null; } From 5a62f55a5b304911123d531af1727b28c54e7b8d Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 13 Feb 2020 16:54:41 +0200 Subject: [PATCH 005/120] Custom routing config initial commit --- .../src/net/osmand/plus/AppInitializer.java | 27 +++++++----- .../osmand/plus/CurrentPositionHelper.java | 4 +- .../net/osmand/plus/OsmandApplication.java | 42 ++++++++++++------- .../SettingsNavigationActivity.java | 4 +- .../plus/helpers/AvoidSpecificRoads.java | 8 ++-- .../net/osmand/plus/helpers/ImportHelper.java | 9 ++-- ...electProfileBottomSheetDialogFragment.java | 5 ++- .../RoutingOptionsHelper.java | 8 ++-- .../osmand/plus/routing/RouteProvider.java | 6 +-- .../plus/routing/TransportRoutingHelper.java | 2 +- .../plus/settings/NavigationFragment.java | 42 +++++++++++-------- .../settings/RouteParametersFragment.java | 2 +- .../settings/VehicleParametersFragment.java | 6 ++- 13 files changed, 97 insertions(+), 68 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index a73fb8aa4f..cc3c472880 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -69,8 +69,10 @@ import java.io.FileOutputStream; import java.io.IOException; import java.lang.reflect.Field; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Random; import btools.routingapp.BRouterServiceConnection; @@ -593,19 +595,23 @@ public class AppInitializer implements IProgress { } public static void loadRoutingFiles(final OsmandApplication app, final LoadRoutingFilesCallback callback) { - new AsyncTask() { - + new AsyncTask>() { + @Override - protected RoutingConfiguration.Builder doInBackground(Void... voids) { + protected Map doInBackground(Void... voids) { + Map customConfigs = new HashMap<>(); File routingFolder = app.getAppPath(IndexConstants.ROUTING_PROFILES_DIR); - RoutingConfiguration.Builder builder = RoutingConfiguration.getDefault(); + RoutingConfiguration.Builder defaultBuilder = RoutingConfiguration.getDefault(); if (routingFolder.isDirectory()) { File[] fl = routingFolder.listFiles(); if (fl != null && fl.length > 0) { for (File f : fl) { - if (f.isFile() && f.getName().endsWith(".xml") && f.canRead()) { + if (f.isFile() && f.getName().endsWith(IndexConstants.ROUTING_FILE_EXT) && f.canRead()) { try { - RoutingConfiguration.parseFromInputStream(new FileInputStream(f), f.getName(), builder); + String fileName = f.getName(); + RoutingConfiguration.Builder builder = new RoutingConfiguration.Builder(); + RoutingConfiguration.parseFromInputStream(new FileInputStream(f), fileName, builder); + customConfigs.put(fileName, builder); } catch (XmlPullParserException | IOException e) { throw new IllegalStateException(e); } @@ -613,13 +619,14 @@ public class AppInitializer implements IProgress { } } } - return builder; + return customConfigs; } @Override - protected void onPostExecute(RoutingConfiguration.Builder builder) { - super.onPostExecute(builder); - app.updateRoutingConfig(builder); + protected void onPostExecute(Map customConfigs) { + if (!customConfigs.isEmpty()) { + app.getCustomRoutingConfigs().putAll(customConfigs); + } callback.onRoutingFilesLoaded(); } }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); diff --git a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java index 5787b62a44..7bf295d4d8 100644 --- a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java +++ b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java @@ -137,11 +137,11 @@ public class CurrentPositionHelper { for (BinaryMapReaderResource rep : checkReaders) { rs[i++] = rep.getReader(BinaryMapReaderResourceType.STREET_LOOKUP); } - RoutingConfiguration cfg = app.getRoutingConfig().build(p, 10, + RoutingConfiguration cfg = app.getRoutingConfigForMode(am).build(p, 10, new HashMap()); cfg.routeCalculationTime = System.currentTimeMillis(); ctx = new RoutePlannerFrontEnd().buildRoutingContext(cfg, null, rs); - RoutingConfiguration defCfg = app.getRoutingConfig().build("geocoding", 10, + RoutingConfiguration defCfg = app.getDefaultRoutingConfig().build("geocoding", 10, new HashMap()); defCtx = new RoutePlannerFrontEnd().buildRoutingContext(defCfg, null, rs); } else { diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 1fa59571b7..245e786059 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -25,12 +25,9 @@ import android.support.v7.app.AlertDialog; import android.text.format.DateFormat; import android.view.View; import android.view.accessibility.AccessibilityManager; -import android.widget.ImageView; -import android.widget.TextView; import android.widget.Toast; import net.osmand.AndroidUtils; -import net.osmand.CallbackWithObject; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; import net.osmand.access.AccessibilityPlugin; @@ -59,7 +56,6 @@ import net.osmand.plus.helpers.AvoidSpecificRoads; import net.osmand.plus.helpers.LockHelper; import net.osmand.plus.helpers.WaypointHelper; import net.osmand.plus.inapp.InAppPurchaseHelper; -import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu; import net.osmand.plus.mapmarkers.MapMarkersDbHelper; import net.osmand.plus.monitoring.LiveMonitoringHelper; import net.osmand.plus.poi.PoiFiltersHelper; @@ -84,11 +80,15 @@ import java.io.PrintStream; import java.lang.Thread.UncaughtExceptionHandler; import java.util.ArrayList; import java.util.Locale; +import java.util.Map; import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; import btools.routingapp.BRouterServiceConnection; import btools.routingapp.IBRouterService; +import static net.osmand.IndexConstants.ROUTING_FILE_EXT; + public class OsmandApplication extends MultiDexApplication { public static final String EXCEPTION_PATH = "exception.log"; public static final String OSMAND_PRIVACY_POLICY_URL = "https://osmand.net/help-online/privacy-policy"; @@ -143,7 +143,8 @@ public class OsmandApplication extends MultiDexApplication { private Resources localizedResources; - private RoutingConfiguration.Builder routingConfig; + private Map customRoutingConfigs = new ConcurrentHashMap<>(); + private Locale preferredLocale = null; private Locale defaultLocale; private File externalStorageDirectory; @@ -810,18 +811,29 @@ public class OsmandApplication extends MultiDexApplication { return localizedResources != null ? localizedResources : super.getResources(); } - public synchronized RoutingConfiguration.Builder getRoutingConfig() { - RoutingConfiguration.Builder rc; - if(routingConfig == null) { - rc = new RoutingConfiguration.Builder(); - } else { - rc = routingConfig; - } - return rc; + public RoutingConfiguration.Builder getDefaultRoutingConfig() { + return RoutingConfiguration.getDefault(); } - public void updateRoutingConfig(Builder update) { - routingConfig = update; + public Map getCustomRoutingConfigs() { + return customRoutingConfigs; + } + + public RoutingConfiguration.Builder getCustomRoutingConfig(String key) { + return customRoutingConfigs.get(key); + } + + public synchronized RoutingConfiguration.Builder getRoutingConfigForMode(ApplicationMode mode) { + RoutingConfiguration.Builder builder = null; + String routingProfileKey = mode.getRoutingProfile(); + if (!Algorithms.isEmpty(routingProfileKey)) { + int index = routingProfileKey.indexOf(ROUTING_FILE_EXT); + if (index != -1) { + String configKey = routingProfileKey.substring(0, index + ROUTING_FILE_EXT.length()); + builder = customRoutingConfigs.get(configKey); + } + } + return builder != null ? builder : getDefaultRoutingConfig(); } public OsmandRegions getRegions() { diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 669570e088..fc7a73a7fc 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -314,7 +314,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { cat.addPreference(fastRoute); } else { ApplicationMode am = settings.getApplicationMode(); - GeneralRouter router = getRouter(getMyApplication().getRoutingConfig(), am); + GeneralRouter router = getRouter(getMyApplication().getRoutingConfigForMode(am), am); clearParameters(); if (router != null) { GeneralRouterProfile routerProfile = router.getProfile(); @@ -728,7 +728,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { final OsmandApplication app = (OsmandApplication) activity.getApplication(); final OsmandSettings settings = app.getSettings(); - GeneralRouter router = getRouter(app.getRoutingConfig(), mode); + GeneralRouter router = getRouter(app.getRoutingConfigForMode(mode), mode); SpeedConstants units = settings.SPEED_SYSTEM.getModeValue(mode); String speedUnits = units.toShortString(activity); final float[] ratio = new float[1]; diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index d8cc1f4def..0ee97d3b69 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -162,7 +162,7 @@ public class AvoidSpecificRoads { app.getSettings().removeImpassableRoad(latLon); RouteDataObject obj = impassableRoads.remove(latLon); if (obj != null) { - app.getRoutingConfig().removeImpassableRoad(obj); + app.getDefaultRoutingConfig().removeImpassableRoad(obj); } } @@ -288,7 +288,7 @@ public class AvoidSpecificRoads { final LatLon oldLoc = getLocation(currentObject); app.getSettings().moveImpassableRoad(oldLoc, newLoc); impassableRoads.remove(oldLoc); - app.getRoutingConfig().removeImpassableRoad(currentObject); + app.getDefaultRoutingConfig().removeImpassableRoad(currentObject); addImpassableRoadInternal(object, ll, showDialog, activity, newLoc); if (callback != null) { @@ -310,7 +310,7 @@ public class AvoidSpecificRoads { boolean showDialog, @Nullable MapActivity activity, @NonNull LatLon loc) { - if (app.getRoutingConfig().addImpassableRoad(object, ll)) { + if (app.getDefaultRoutingConfig().addImpassableRoad(object, ll)) { impassableRoads.put(loc, object); } else { LatLon location = getLocation(object); @@ -339,7 +339,7 @@ public class AvoidSpecificRoads { } public LatLon getLocation(RouteDataObject object) { - Location location = app.getRoutingConfig().getImpassableRoadLocations().get(object.getId()); + Location location = app.getDefaultRoutingConfig().getImpassableRoadLocations().get(object.getId()); return location == null ? null : new LatLon(location.getLatitude(), location.getLongitude()); } diff --git a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java index ecdfdf49aa..adf0707463 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java @@ -55,7 +55,6 @@ import net.osmand.router.RoutingConfiguration; import net.osmand.util.Algorithms; import org.apache.commons.logging.Log; -import org.xmlpull.v1.XmlPullParserException; import java.io.ByteArrayInputStream; import java.io.File; @@ -661,7 +660,7 @@ public class ImportHelper { } @SuppressLint("StaticFieldLeak") - private void handleRoutingFileImport(final Uri uri, final String fileName, final CallbackWithObject callback) { + private void handleRoutingFileImport(final Uri uri, final String fileName, final CallbackWithObject callback) { final AsyncTask routingImportTask = new AsyncTask() { String mFileName; @@ -698,11 +697,11 @@ public class ImportHelper { if (isActivityNotDestroyed(activity)) { progress.dismiss(); } - String profileKey = app.getRoutingConfig().getRoutingProfileKeyByFileName(mFileName); - if (profileKey != null) { + RoutingConfiguration.Builder builder = app.getCustomRoutingConfig(mFileName); + if (builder != null) { app.showShortToastMessage(app.getString(R.string.file_imported_successfully, mFileName)); if (callback != null) { - callback.processResult(profileKey); + callback.processResult(builder); } } else { app.showToastMessage(app.getString(R.string.file_does_not_contain_routing_rules, mFileName)); diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java index f968291d6e..1d7b25c1f1 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java @@ -30,6 +30,7 @@ import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.settings.MainSettingsFragment; import net.osmand.plus.settings.NavigationFragment; import net.osmand.plus.settings.ProfileAppearanceFragment; +import net.osmand.router.RoutingConfiguration; import org.apache.commons.logging.Log; @@ -160,9 +161,9 @@ public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialo return; } mapActivity.getImportHelper().chooseFileToImport(ROUTING, false, - new CallbackWithObject() { + new CallbackWithObject() { @Override - public boolean processResult(String profileKey) { + public boolean processResult(RoutingConfiguration.Builder builder) { refreshView(); return false; } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java index eae018184e..8e9613c844 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java @@ -409,7 +409,7 @@ public class RoutingOptionsHelper { public LocalRoutingParameter getRoutingParameterInnerById(ApplicationMode am, String parameterId) { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); - GeneralRouter rm = getRouter(app.getRoutingConfig(), am); + GeneralRouter rm = getRouter(app.getRoutingConfigForMode(am), am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return null; } @@ -493,7 +493,7 @@ public class RoutingOptionsHelper { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); List list = new ArrayList(getGpxRouterParameters(am)); - GeneralRouter rm = SettingsNavigationActivity.getRouter(app.getRoutingConfig(), am); + GeneralRouter rm = SettingsNavigationActivity.getRouter(app.getRoutingConfigForMode(am), am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return list; } @@ -583,7 +583,7 @@ public class RoutingOptionsHelper { public List getAvoidRoutingPrefsForAppMode(ApplicationMode applicationMode) { List avoidParameters = new ArrayList(); - GeneralRouter router = getRouter(app.getRoutingConfig(), applicationMode); + GeneralRouter router = getRouter(app.getRoutingConfigForMode(applicationMode), applicationMode); if (router != null) { for (Map.Entry e : router.getParameters().entrySet()) { String param = e.getKey(); @@ -597,7 +597,7 @@ public class RoutingOptionsHelper { } public GeneralRouter.RoutingParameter getRoutingPrefsForAppModeById(ApplicationMode applicationMode, String parameterId) { - GeneralRouter router = getRouter(app.getRoutingConfig(), applicationMode); + GeneralRouter router = getRouter(app.getRoutingConfigForMode(applicationMode), applicationMode); GeneralRouter.RoutingParameter parameter = null; if (router != null) { diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index f24a47851a..649e008c19 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -597,10 +597,10 @@ public class RouteProvider { RoutePlannerFrontEnd router = new RoutePlannerFrontEnd(); OsmandSettings settings = params.ctx.getSettings(); router.setUseFastRecalculation(settings.USE_FAST_RECALCULATION.get()); - - RoutingConfiguration.Builder config = params.ctx.getRoutingConfig(); + + RoutingConfiguration.Builder config = params.ctx.getRoutingConfigForMode(params.mode); GeneralRouter generalRouter = SettingsNavigationActivity.getRouter(config, params.mode); - if(generalRouter == null) { + if (generalRouter == null) { return applicationModeNotSupported(params); } RoutingConfiguration cf = initOsmAndRoutingConfig(config, params, settings, generalRouter); diff --git a/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java index 368daa4793..c1d4616cb9 100644 --- a/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/TransportRoutingHelper.java @@ -452,7 +452,7 @@ public class TransportRoutingHelper { } private List calculateRouteImpl(TransportRouteCalculationParams params) throws IOException, InterruptedException { - RoutingConfiguration.Builder config = params.ctx.getRoutingConfig(); + RoutingConfiguration.Builder config = params.ctx.getRoutingConfigForMode(params.mode); BinaryMapIndexReader[] files = params.ctx.getResourceManager().getTransportRoutingMapFiles(); params.params.clear(); OsmandSettings settings = params.ctx.getSettings(); diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 82f80519eb..5bcc1eab81 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -19,6 +19,7 @@ import net.osmand.plus.profiles.SelectProfileBottomSheetDialogFragment; import net.osmand.plus.routing.RouteProvider; import net.osmand.plus.settings.preferences.SwitchPreferenceEx; import net.osmand.router.GeneralRouter; +import net.osmand.router.RoutingConfiguration; import net.osmand.util.Algorithms; import java.util.ArrayList; @@ -158,7 +159,7 @@ 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.DIRECT_TO_MODE.name())){ + } 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; @@ -227,26 +228,33 @@ public class NavigationFragment extends BaseSettingsFragment { false, null)); } - Map inputProfiles = context.getRoutingConfig().getAllRouters(); - for (Map.Entry e : inputProfiles.entrySet()) { - if (!e.getKey().equals("geocoding")) { - int iconRes = R.drawable.ic_action_gdirections_dark; - String name = e.getValue().getProfileName(); - String description = context.getString(R.string.osmand_default_routing); - if (!Algorithms.isEmpty(e.getValue().getFilename())) { - description = e.getValue().getFilename(); - } else if (RoutingProfilesResources.isRpValue(name.toUpperCase())) { - iconRes = RoutingProfilesResources.valueOf(name.toUpperCase()).getIconRes(); - name = context - .getString(RoutingProfilesResources.valueOf(name.toUpperCase()).getStringRes()); - } - profilesObjects.put(e.getKey(), new RoutingProfileDataObject(e.getKey(), name, description, - iconRes, false, e.getValue().getFilename())); - } + collectRoutingProfilesFromConfig(context, context.getDefaultRoutingConfig(), profilesObjects); + for (RoutingConfiguration.Builder builder : context.getCustomRoutingConfigs().values()) { + collectRoutingProfilesFromConfig(context, builder, profilesObjects); } return profilesObjects; } + private static void collectRoutingProfilesFromConfig(OsmandApplication app, RoutingConfiguration.Builder builder, Map profilesObjects) { + for (Map.Entry entry : builder.getAllRouters().entrySet()) { + String routerKey = entry.getKey(); + GeneralRouter router = entry.getValue(); + if (!routerKey.equals("geocoding")) { + int iconRes = R.drawable.ic_action_gdirections_dark; + String name = router.getProfileName(); + String description = app.getString(R.string.osmand_default_routing); + if (!Algorithms.isEmpty(router.getFilename())) { + description = router.getFilename(); + } else if (RoutingProfilesResources.isRpValue(name.toUpperCase())) { + iconRes = RoutingProfilesResources.valueOf(name.toUpperCase()).getIconRes(); + name = app.getString(RoutingProfilesResources.valueOf(name.toUpperCase()).getStringRes()); + } + profilesObjects.put(routerKey, new RoutingProfileDataObject(routerKey, name, description, + iconRes, false, router.getFilename())); + } + } + } + public static List getBaseProfiles(Context ctx) { List profiles = new ArrayList<>(); for (ApplicationMode mode : ApplicationMode.getDefaultValues()) { diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 43ff4efddc..247028b150 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -140,7 +140,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); } else { - GeneralRouter router = getRouter(getMyApplication().getRoutingConfig(), am); + GeneralRouter router = getRouter(app.getRoutingConfigForMode(am), am); clearParameters(); if (router != null) { Map parameters = router.getParameters(); diff --git a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java index 35abeb4911..8bef67b69a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java @@ -6,6 +6,7 @@ import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceViewHolder; import android.widget.ImageView; +import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; @@ -38,9 +39,10 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O vehicleParametersInfo.setIcon(getContentIcon(R.drawable.ic_action_info_dark)); vehicleParametersInfo.setTitle(getString(R.string.route_parameters_info, getSelectedAppMode().toHumanString())); - RouteService routeService = getSelectedAppMode().getRouteService(); + ApplicationMode mode = getSelectedAppMode(); + RouteService routeService = mode.getRouteService(); if (routeService == RouteService.OSMAND) { - GeneralRouter router = getRouter(app.getRoutingConfig(), getSelectedAppMode()); + GeneralRouter router = getRouter(app.getRoutingConfigForMode(mode), mode); if (router != null) { Map parameters = router.getParameters(); From 640fb6af3d1dfdfb90669dd061c121a2094ed88a Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Thu, 13 Feb 2020 17:07:18 +0200 Subject: [PATCH 006/120] fix values for miles/feets --- .../plus/settings/RouteParametersFragment.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 70d393d3d6..a570fc6ed1 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -235,7 +235,17 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } private void setupSelectRouteRecalcDistance(PreferenceScreen screen) { - Float[] entryValues = new Float[] {-1.0f, 10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f}; + Float[] entryValues; + + + OsmandSettings settings = app.getSettings(); + OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.get(); + if (mc == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS) { + entryValues = new Float[] {-1.0f, 10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f}; + } else { + entryValues = new Float[] {-1.0f, 9.1f, 18.3f, 30.5f, 45.7f, 91.5f, 183.0f, 482.0f, 965.0f, 1609.0f}; + } + String[] entries = new String[entryValues.length]; entries[0] = getString(R.string.shared_string_not_selected); for (int i = 1; i < entryValues.length; i++) { From 1578f4c91c98db7d6992940972a494c9d435df5e Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Fri, 14 Feb 2020 11:16:06 +0200 Subject: [PATCH 007/120] settings change --- OsmAnd/res/values/strings.xml | 1 + .../src/net/osmand/plus/OsmandSettings.java | 14 ++++++++++--- .../MeasurementEditingContext.java | 3 ++- .../plus/routing/RouteCalculationParams.java | 1 - .../plus/routing/RouteCalculationResult.java | 11 +++++----- .../osmand/plus/routing/RouteProvider.java | 1 - .../osmand/plus/routing/RoutingHelper.java | 14 ++++++------- .../settings/RouteParametersFragment.java | 21 ++++++++++++------- 8 files changed, 40 insertions(+), 26 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 053fa0d73f..4f5bc77ae9 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,7 @@ Thx - Hardy --> + Disable recalculation Open settings Plugin disabled This plugin is a separate application, you will need to remove it separately if you no longer plan to use it.\n\nThe plugin will remain on the device after removing OsmAnd. diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 6cb2b76218..df456864b0 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -451,7 +451,7 @@ public class OsmandSettings { public void copyProfilePreferences(ApplicationMode modeFrom, ApplicationMode modeTo, List profilePreferences) { for (OsmandPreference pref : profilePreferences) { - if (prefCanBeCopiedOrReset(pref) && !USER_PROFILE_NAME.getId().equals(pref.getId())) { + if (prefCanBeCopiedOrReset(pref) && !USER_PROFILE_NAME.getId().equals(pref.getId()) && !ROUTE_RECALCULATION_DISTANCE.getId().equals(pref.getId())) { CommonPreference profilePref = (CommonPreference) pref; if (PARENT_APP_MODE.getId().equals(pref.getId())) { if (modeTo.isCustomProfile()) { @@ -1465,7 +1465,7 @@ public class OsmandSettings { @Override public SpeedConstants getProfileDefaultValue(ApplicationMode mode) { - MetricsConstants mc = METRIC_SYSTEM.get(); + MetricsConstants mc = METRIC_SYSTEM.getModeValue(mode); if (mode.isDerivedRoutingFrom(ApplicationMode.PEDESTRIAN)) { if (mc == MetricsConstants.KILOMETERS_AND_METERS) { return SpeedConstants.MINUTES_PER_KILOMETER; @@ -3282,7 +3282,15 @@ public class OsmandSettings { return customBooleanRoutingProps.get(attrName); } - public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", -1.f).makeProfile(); + public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 0.f){ + @Override + public Float getProfileDefaultValue(ApplicationMode mode) { + if (mode.getRouteService() == RouteService.DIRECT_TO) { + return -1.0f; + } + return super.getProfileDefaultValue(mode); + } + }.makeProfile(); public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference("enable_osmc_routing", true).makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java index 940ee0f2ef..48894acc74 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java @@ -353,7 +353,8 @@ public class MeasurementEditingContext { } } }; - + params.routeRecalculationDistance + = application.getSettings().ROUTE_RECALCULATION_DISTANCE.getModeValue(snapToRoadAppMode); return params; } diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java index f1b950d1f6..869d4c3e54 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java @@ -35,7 +35,6 @@ public class RouteCalculationParams { public RouteCalculationResultListener resultListener; public boolean showOriginalRoute; - public boolean noRecalculations; public float routeRecalculationDistance; public interface RouteCalculationResultListener { diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 4b71d4cbec..6fe1bc2aff 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -63,9 +63,9 @@ public class RouteCalculationResult { protected int currentWaypointGPX = 0; protected int lastWaypointGPX = 0; protected ApplicationMode appMode; - protected boolean noRecalculations = false; + protected boolean showOriginalRoute = false; - protected float routeRecalcDistance = -1f; + protected float routeRecalcDistance = 0.f; public RouteCalculationResult(String errorMessage) { this.errorMessage = errorMessage; @@ -114,9 +114,10 @@ public class RouteCalculationResult { updateDirectionsTime(this.directions, this.listDistance); this.showOriginalRoute = params.showOriginalRoute; - this.noRecalculations = params.noRecalculations; - if (params.routeRecalculationDistance != 0) - this.routeRecalcDistance = params.routeRecalculationDistance; + + if (params.routeRecalculationDistance != 0.f) { + this.routeRecalcDistance = params.routeRecalculationDistance; + } } public RouteCalculationResult(List list, Location start, LatLon end, List intermediates, diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 99ad7baa3a..f24a47851a 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -1262,7 +1262,6 @@ public class RouteProvider { private RouteCalculationResult findDirectTo(RouteCalculationParams params) { params.showOriginalRoute = true; - params.noRecalculations = true; double[] lats = new double[] { params.start.getLatitude(), params.end.getLatitude() }; double[] lons = new double[] { params.start.getLongitude(), params.end.getLongitude() }; List intermediates = params.intermediates; diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 0413c198ba..47cdc1b31c 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -441,8 +441,8 @@ public class RoutingHelper { // 2. Analyze if we need to recalculate route // >100m off current route (sideways) or parameter (for Straight line) - if (currentRoute > 0 && !route.noRecalculations) { - double allowableDeviation = route.routeRecalcDistance <= 0 ? (1.7 * posTolerance) : route.routeRecalcDistance; + if (currentRoute > 0 && route.getRouteRecalcDistance() >= 0.f) { + double allowableDeviation = route.routeRecalcDistance == 0 ? (1.7 * posTolerance) : route.routeRecalcDistance; distOrth = getOrthogonalDistance(currentLocation, routeNodes.get(currentRoute - 1), routeNodes.get(currentRoute)); if ((!settings.DISABLE_OFFROUTE_RECALC.get()) && (distOrth > allowableDeviation)) { log.info("Recalculate route, because correlation : " + distOrth); //$NON-NLS-1$ @@ -453,9 +453,9 @@ public class RoutingHelper { // 3. Identify wrong movement direction Location next = route.getNextRouteLocation(); boolean wrongMovementDirection = checkWrongMovementDirection(currentLocation, next); - double allowableDeviation = route.routeRecalcDistance <= 0 ? (2 * posTolerance) : route.routeRecalcDistance; + double allowableDeviation = route.routeRecalcDistance == 0.f ? (2 * posTolerance) : route.routeRecalcDistance; if ((!settings.DISABLE_WRONG_DIRECTION_RECALC.get()) && wrongMovementDirection - && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > allowableDeviation) && !route.noRecalculations) { + && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > allowableDeviation) && route.getRouteRecalcDistance() >= 0) { log.info("Recalculate route, because wrong movement direction: " + currentLocation.distanceTo(routeNodes.get(currentRoute))); //$NON-NLS-1$ isDeviatedFromRoute = true; calculateRoute = true; @@ -467,15 +467,15 @@ public class RoutingHelper { // 5. Update Voice router // Do not update in route planning mode if (isFollowingMode) { - boolean inRecalc = calculateRoute || isRouteBeingCalculated(); + boolean inRecalc = (calculateRoute || isRouteBeingCalculated()); if (!inRecalc && !wrongMovementDirection) { voiceRouter.updateStatus(currentLocation, false); voiceRouterStopped = false; - } else if (isDeviatedFromRoute && !voiceRouterStopped && !route.noRecalculations) { + } else if (isDeviatedFromRoute && !voiceRouterStopped && route.getRouteRecalcDistance() >= 0.f) { voiceRouter.interruptRouteCommands(); voiceRouterStopped = true; // Prevents excessive execution of stop() code } - if (distOrth > mode.getOffRouteDistance() && !route.noRecalculations) { + if (distOrth > mode.getOffRouteDistance() && route.getRouteRecalcDistance() >= 0.f) { voiceRouter.announceOffRoute(distOrth); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index a570fc6ed1..05907ae893 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -143,7 +143,9 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); if (am.getRouteService() == RouteProvider.RouteService.STRAIGHT) { - setupSelectRouteRecalcDistance(screen); + setupSelectRouteRecalcDistance(screen, 1); + } else if (am.getRouteService() == RouteProvider.RouteService.DIRECT_TO) { + setupSelectRouteRecalcDistance(screen, 0); } } else { GeneralRouter router = getRouter(getMyApplication().getRoutingConfig(), am); @@ -234,29 +236,32 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } } - private void setupSelectRouteRecalcDistance(PreferenceScreen screen) { + private void setupSelectRouteRecalcDistance(PreferenceScreen screen, int defaultValue) { Float[] entryValues; - - OsmandSettings settings = app.getSettings(); OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.get(); if (mc == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS) { - entryValues = new Float[] {-1.0f, 10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f}; + entryValues = new Float[] {-1.0f, 0.f, 10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f}; } else { - entryValues = new Float[] {-1.0f, 9.1f, 18.3f, 30.5f, 45.7f, 91.5f, 183.0f, 482.0f, 965.0f, 1609.0f}; + entryValues = new Float[] {-1.0f, 0.f, 9.1f, 18.3f, 30.5f, 45.7f, 91.5f, 183.0f, 482.0f, 965.0f, 1609.0f}; } String[] entries = new String[entryValues.length]; - entries[0] = getString(R.string.shared_string_not_selected); - for (int i = 1; i < entryValues.length; i++) { + entries[0] = getString(R.string.no_recalculation_setting); + entries[1] = getString(R.string.shared_string_default); + + for (int i = 2; i < entryValues.length; i++) { entries[i] = OsmAndFormatter.getFormattedDistance(entryValues[i], app, false); } ListPreferenceEx routeRecalculationDist = createListPreferenceEx(settings.ROUTE_RECALCULATION_DISTANCE.getId(), entries, entryValues, R.string.route_recalculation_dist_title, R.layout.preference_with_descr); + routeRecalculationDist.setEntries(entries); routeRecalculationDist.setEntryValues(entryValues); routeRecalculationDist.setDescription(getString(R.string.route_recalculation_dist_descr)); routeRecalculationDist.setIcon(getRoutingPrefIcon("routing_recalc_distance")); + + screen.addPreference(routeRecalculationDist); } From 3d992b56e32487e20d25e582929db477996c90cf Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 14 Feb 2020 12:23:11 +0200 Subject: [PATCH 008/120] Make impassable road locations static --- .../java/net/osmand/router/RoutingConfiguration.java | 8 ++++---- OsmAnd/src/net/osmand/plus/AppInitializer.java | 3 ++- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 4 ++-- .../plus/activities/SettingsNavigationActivity.java | 11 ++++++++--- .../net/osmand/plus/helpers/AvoidSpecificRoads.java | 9 +++++---- .../routepreparationmenu/RoutingOptionsHelper.java | 9 ++++----- .../net/osmand/plus/settings/NavigationFragment.java | 7 ++++--- .../osmand/plus/settings/RouteParametersFragment.java | 3 +-- .../plus/settings/VehicleParametersFragment.java | 6 +++--- 9 files changed, 33 insertions(+), 27 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java index a48300e207..f09fdf2b10 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java @@ -55,7 +55,7 @@ public class RoutingConfiguration { private String defaultRouter = ""; private Map routers = new LinkedHashMap<>(); private Map attributes = new LinkedHashMap<>(); - private HashMap impassableRoadLocations = new HashMap<>(); + private static HashMap impassableRoadLocations = new HashMap<>(); // Example // { @@ -103,11 +103,11 @@ public class RoutingConfiguration { return i; } - public Map getImpassableRoadLocations() { + public static Map getImpassableRoadLocations() { return impassableRoadLocations; } - public boolean addImpassableRoad(RouteDataObject route, Location location) { + public static boolean addImpassableRoad(RouteDataObject route, Location location) { if (!impassableRoadLocations.containsKey(route.id)){ impassableRoadLocations.put(route.id, location); return true; @@ -148,7 +148,7 @@ public class RoutingConfiguration { return routers; } - public void removeImpassableRoad(RouteDataObject obj) { + public static void removeImpassableRoad(RouteDataObject obj) { impassableRoadLocations.remove(obj.id); } } diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index cc3c472880..90b1ee44da 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -599,9 +599,9 @@ public class AppInitializer implements IProgress { @Override protected Map doInBackground(Void... voids) { + RoutingConfiguration.getDefault(); // load default builder Map customConfigs = new HashMap<>(); File routingFolder = app.getAppPath(IndexConstants.ROUTING_PROFILES_DIR); - RoutingConfiguration.Builder defaultBuilder = RoutingConfiguration.getDefault(); if (routingFolder.isDirectory()) { File[] fl = routingFolder.listFiles(); if (fl != null && fl.length > 0) { @@ -611,6 +611,7 @@ public class AppInitializer implements IProgress { String fileName = f.getName(); RoutingConfiguration.Builder builder = new RoutingConfiguration.Builder(); RoutingConfiguration.parseFromInputStream(new FileInputStream(f), fileName, builder); + customConfigs.put(fileName, builder); } catch (XmlPullParserException | IOException e) { throw new IllegalStateException(e); diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 245e786059..3bb700ca3d 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -811,7 +811,7 @@ public class OsmandApplication extends MultiDexApplication { return localizedResources != null ? localizedResources : super.getResources(); } - public RoutingConfiguration.Builder getDefaultRoutingConfig() { + public synchronized RoutingConfiguration.Builder getDefaultRoutingConfig() { return RoutingConfiguration.getDefault(); } @@ -823,7 +823,7 @@ public class OsmandApplication extends MultiDexApplication { return customRoutingConfigs.get(key); } - public synchronized RoutingConfiguration.Builder getRoutingConfigForMode(ApplicationMode mode) { + public RoutingConfiguration.Builder getRoutingConfigForMode(ApplicationMode mode) { RoutingConfiguration.Builder builder = null; String routingProfileKey = mode.getRoutingProfile(); if (!Algorithms.isEmpty(routingProfileKey)) { diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index fc7a73a7fc..5cd2b87490 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -52,6 +52,7 @@ import net.osmand.router.GeneralRouter; import net.osmand.router.GeneralRouter.GeneralRouterProfile; import net.osmand.router.GeneralRouter.RoutingParameter; import net.osmand.router.GeneralRouter.RoutingParameterType; +import net.osmand.router.RoutingConfiguration; import net.osmand.util.Algorithms; import java.util.ArrayList; @@ -314,7 +315,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { cat.addPreference(fastRoute); } else { ApplicationMode am = settings.getApplicationMode(); - GeneralRouter router = getRouter(getMyApplication().getRoutingConfigForMode(am), am); + GeneralRouter router = getRouter(getMyApplication(), am); clearParameters(); if (router != null) { GeneralRouterProfile routerProfile = router.getProfile(); @@ -430,10 +431,14 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { reliefFactorParameters.clear(); } + public static GeneralRouter getRouter(OsmandApplication app, ApplicationMode mode) { + RoutingConfiguration.Builder builder = app.getRoutingConfigForMode(mode); + return getRouter(builder, mode); + } public static GeneralRouter getRouter(net.osmand.router.RoutingConfiguration.Builder builder, ApplicationMode am) { GeneralRouter router = builder.getRouter(am.getRoutingProfile()); - if(router == null && am.getParent() != null) { + if (router == null && am.getParent() != null) { router = builder.getRouter(am.getParent().getStringKey()); } return router; @@ -728,7 +733,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { final OsmandApplication app = (OsmandApplication) activity.getApplication(); final OsmandSettings settings = app.getSettings(); - GeneralRouter router = getRouter(app.getRoutingConfigForMode(mode), mode); + GeneralRouter router = getRouter(app, mode); SpeedConstants units = settings.SPEED_SYSTEM.getModeValue(mode); String speedUnits = units.toShortString(activity); final float[] ratio = new float[1]; diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index 0ee97d3b69..efe859624e 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -36,6 +36,7 @@ import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.routing.RoutingHelper.RouteSegmentSearchResult; import net.osmand.plus.views.ContextMenuLayer; import net.osmand.router.RouteSegmentResult; +import net.osmand.router.RoutingConfiguration; import net.osmand.util.MapUtils; import java.util.ArrayList; @@ -162,7 +163,7 @@ public class AvoidSpecificRoads { app.getSettings().removeImpassableRoad(latLon); RouteDataObject obj = impassableRoads.remove(latLon); if (obj != null) { - app.getDefaultRoutingConfig().removeImpassableRoad(obj); + RoutingConfiguration.Builder.removeImpassableRoad(obj); } } @@ -288,7 +289,7 @@ public class AvoidSpecificRoads { final LatLon oldLoc = getLocation(currentObject); app.getSettings().moveImpassableRoad(oldLoc, newLoc); impassableRoads.remove(oldLoc); - app.getDefaultRoutingConfig().removeImpassableRoad(currentObject); + RoutingConfiguration.Builder.removeImpassableRoad(currentObject); addImpassableRoadInternal(object, ll, showDialog, activity, newLoc); if (callback != null) { @@ -310,7 +311,7 @@ public class AvoidSpecificRoads { boolean showDialog, @Nullable MapActivity activity, @NonNull LatLon loc) { - if (app.getDefaultRoutingConfig().addImpassableRoad(object, ll)) { + if (RoutingConfiguration.Builder.addImpassableRoad(object, ll)) { impassableRoads.put(loc, object); } else { LatLon location = getLocation(object); @@ -339,7 +340,7 @@ public class AvoidSpecificRoads { } public LatLon getLocation(RouteDataObject object) { - Location location = app.getDefaultRoutingConfig().getImpassableRoadLocations().get(object.getId()); + Location location = RoutingConfiguration.Builder.getImpassableRoadLocations().get(object.getId()); return location == null ? null : new LatLon(location.getLatitude(), location.getLongitude()); } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java index 8e9613c844..3160256a39 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java @@ -55,7 +55,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static net.osmand.plus.activities.SettingsNavigationActivity.getRouter; public class RoutingOptionsHelper { @@ -409,7 +408,7 @@ public class RoutingOptionsHelper { public LocalRoutingParameter getRoutingParameterInnerById(ApplicationMode am, String parameterId) { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); - GeneralRouter rm = getRouter(app.getRoutingConfigForMode(am), am); + GeneralRouter rm = SettingsNavigationActivity.getRouter(app, am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return null; } @@ -493,7 +492,7 @@ public class RoutingOptionsHelper { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); List list = new ArrayList(getGpxRouterParameters(am)); - GeneralRouter rm = SettingsNavigationActivity.getRouter(app.getRoutingConfigForMode(am), am); + GeneralRouter rm = SettingsNavigationActivity.getRouter(app, am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return list; } @@ -583,7 +582,7 @@ public class RoutingOptionsHelper { public List getAvoidRoutingPrefsForAppMode(ApplicationMode applicationMode) { List avoidParameters = new ArrayList(); - GeneralRouter router = getRouter(app.getRoutingConfigForMode(applicationMode), applicationMode); + GeneralRouter router = SettingsNavigationActivity.getRouter(app, applicationMode); if (router != null) { for (Map.Entry e : router.getParameters().entrySet()) { String param = e.getKey(); @@ -597,7 +596,7 @@ public class RoutingOptionsHelper { } public GeneralRouter.RoutingParameter getRoutingPrefsForAppModeById(ApplicationMode applicationMode, String parameterId) { - GeneralRouter router = getRouter(app.getRoutingConfigForMode(applicationMode), applicationMode); + GeneralRouter router = SettingsNavigationActivity.getRouter(app, applicationMode); GeneralRouter.RoutingParameter parameter = null; if (router != null) { diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 5bcc1eab81..18190d02cd 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -243,14 +243,15 @@ public class NavigationFragment extends BaseSettingsFragment { int iconRes = R.drawable.ic_action_gdirections_dark; String name = router.getProfileName(); String description = app.getString(R.string.osmand_default_routing); - if (!Algorithms.isEmpty(router.getFilename())) { - description = router.getFilename(); + String fileName = router.getFilename(); + if (!Algorithms.isEmpty(fileName)) { + description = fileName; } else if (RoutingProfilesResources.isRpValue(name.toUpperCase())) { iconRes = RoutingProfilesResources.valueOf(name.toUpperCase()).getIconRes(); name = app.getString(RoutingProfilesResources.valueOf(name.toUpperCase()).getStringRes()); } profilesObjects.put(routerKey, new RoutingProfileDataObject(routerKey, name, description, - iconRes, false, router.getFilename())); + iconRes, false, fileName)); } } } diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 247028b150..1987bc3fb0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -33,7 +33,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static net.osmand.plus.activities.SettingsNavigationActivity.getRouter; import static net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.DRIVING_STYLE; public class RouteParametersFragment extends BaseSettingsFragment implements OnPreferenceChanged { @@ -140,7 +139,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); } else { - GeneralRouter router = getRouter(app.getRoutingConfigForMode(am), am); + GeneralRouter router = SettingsNavigationActivity.getRouter(app, am); clearParameters(); if (router != null) { Map parameters = router.getParameters(); diff --git a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java index 8bef67b69a..155dfbd573 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java @@ -34,15 +34,15 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O if (app == null) { return; } + ApplicationMode mode = getSelectedAppMode(); Preference vehicleParametersInfo = findPreference("vehicle_parameters_info"); vehicleParametersInfo.setIcon(getContentIcon(R.drawable.ic_action_info_dark)); - vehicleParametersInfo.setTitle(getString(R.string.route_parameters_info, getSelectedAppMode().toHumanString())); + vehicleParametersInfo.setTitle(getString(R.string.route_parameters_info, mode.toHumanString())); - ApplicationMode mode = getSelectedAppMode(); RouteService routeService = mode.getRouteService(); if (routeService == RouteService.OSMAND) { - GeneralRouter router = getRouter(app.getRoutingConfigForMode(mode), mode); + GeneralRouter router = getRouter(app, mode); if (router != null) { Map parameters = router.getParameters(); From d39805441bd4fee681ce62d7937679b0b326e327 Mon Sep 17 00:00:00 2001 From: Nazar Date: Fri, 14 Feb 2020 14:50:48 +0200 Subject: [PATCH 009/120] Add continuous and single scrolling --- .../osmand/plus/activities/MapActivity.java | 44 +++-- .../net/osmand/plus/helpers/ScrollHelper.java | 187 ++++++++++++++++++ 2 files changed, 211 insertions(+), 20 deletions(-) create mode 100644 OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index e775297667..e834bba01b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -109,6 +109,7 @@ import net.osmand.plus.helpers.ExternalApiHelper; import net.osmand.plus.helpers.ImportHelper; import net.osmand.plus.helpers.ImportHelper.ImportGpxBottomSheetDialogFragment; import net.osmand.plus.helpers.LockHelper; +import net.osmand.plus.helpers.ScrollHelper; import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment; import net.osmand.plus.mapcontextmenu.MapContextMenu; import net.osmand.plus.mapcontextmenu.MenuController.MenuState; @@ -181,7 +182,8 @@ import static net.osmand.plus.OsmandSettings.WUNDERLINQ_EXTERNAL_DEVICE; public class MapActivity extends OsmandActionBarActivity implements DownloadEvents, OnRequestPermissionsResultCallback, IRouteInformationListener, AMapPointUpdateListener, MapMarkerChangedListener, OnDismissDialogFragmentListener, OnDrawMapListener, - OsmAndAppCustomizationListener, LockHelper.LockUIAdapter, PreferenceFragmentCompat.OnPreferenceStartFragmentCallback { + OsmAndAppCustomizationListener, LockHelper.LockUIAdapter, PreferenceFragmentCompat.OnPreferenceStartFragmentCallback, + ScrollHelper.OnScrollEventListener { public static final String INTENT_KEY_PARENT_MAP_ACTIVITY = "intent_parent_map_activity_key"; public static final String INTENT_PARAMS = "intent_prarams"; @@ -192,6 +194,9 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven private static final int ZOOM_LABEL_DISPLAY = 16; private static final int MIN_ZOOM_LABEL_DISPLAY = 12; private static final int SECOND_SPLASH_TIME_OUT = 8000; + + private static final int SMALL_SCROLLING_UNIT = 1; + private static final int BIG_SCROLLING_UNIT = 200; private static final Log LOG = PlatformUtil.getLog(MapActivity.class); @@ -247,6 +252,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven private ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor(); private LockHelper lockHelper; + private ScrollHelper mapScrollHelper; private StateChangedListener mapScreenOrientationSettingListener = new StateChangedListener() { @Override @@ -269,6 +275,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven app = getMyApplication(); settings = app.getSettings(); lockHelper = app.getLockHelper(); + mapScrollHelper = new ScrollHelper(app); app.applyTheme(this); supportRequestWindowFeature(Window.FEATURE_NO_TITLE); @@ -1403,6 +1410,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven super.onStart(); stopped = false; lockHelper.onStart(this); + mapScrollHelper.setListener(this); getMyApplication().getNotificationHelper().showNotifications(); } @@ -1422,6 +1430,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } stopped = true; lockHelper.onStop(this); + mapScrollHelper.setListener(null); super.onStop(); } @@ -1604,13 +1613,14 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven uiHandler.sendMessageDelayed(msg, LONG_KEYPRESS_DELAY); } return true; + } else if (mapScrollHelper.isScrollingDirectionKeyCode(keyCode)) { + return mapScrollHelper.onKeyDown(keyCode, event); } return super.onKeyDown(keyCode, event); } @Override public boolean onKeyUp(int keyCode, KeyEvent event) { - final int scrollingUnit = 15; if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { if (!app.accessibilityEnabled()) { mapActions.contextMenuPoint(mapView.getLatitude(), mapView.getLongitude()); @@ -1623,6 +1633,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven // repeat count 0 doesn't work for samsung, 1 doesn't work for lg toggleDrawer(); return true; + } else if (keyCode == KeyEvent.KEYCODE_C) { + mapViewTrackingUtilities.backToLocationImpl(); } else if (settings.EXTERNAL_INPUT_DEVICE.get() == PARROT_EXTERNAL_DEVICE) { // Parrot device has only dpad left and right if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) { @@ -1647,6 +1659,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven startActivity(intent); return true; } + } else if (mapScrollHelper.isScrollingDirectionKeyCode(keyCode)) { + return mapScrollHelper.onKeyUp(keyCode, event); } else if (settings.EXTERNAL_INPUT_DEVICE.get() == GENERIC_EXTERNAL_DEVICE) { if (keyCode == KeyEvent.KEYCODE_MINUS) { changeZoom(-1); @@ -1654,25 +1668,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } else if (keyCode == KeyEvent.KEYCODE_PLUS) { changeZoom(1); return true; - } else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { - scrollMap(0, scrollingUnit); - return true; - } else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) { - scrollMap(0, -scrollingUnit); - return true; - } else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) { - scrollMap(-scrollingUnit, 0); - return true; - } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) { - scrollMap(scrollingUnit, 0); - return true; } - } else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT - || keyCode == KeyEvent.KEYCODE_DPAD_DOWN || keyCode == KeyEvent.KEYCODE_DPAD_UP) { - int dx = keyCode == KeyEvent.KEYCODE_DPAD_RIGHT ? scrollingUnit : (keyCode == KeyEvent.KEYCODE_DPAD_LEFT ? -scrollingUnit : 0); - int dy = keyCode == KeyEvent.KEYCODE_DPAD_DOWN ? scrollingUnit : (keyCode == KeyEvent.KEYCODE_DPAD_UP ? -scrollingUnit : 0); - scrollMap(dx, dy); - return true; } else if (OsmandPlugin.onMapActivityKeyUp(this, keyCode)) { return true; } @@ -2174,6 +2170,14 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } } + @Override + public void onScrollEvent(boolean continuousScrolling, boolean up, boolean down, boolean left, boolean right) { + int scrollingUnit = continuousScrolling ? SMALL_SCROLLING_UNIT : BIG_SCROLLING_UNIT; + int dx = (left ? -scrollingUnit : 0) + (right ? scrollingUnit : 0); + int dy = (up ? -scrollingUnit : 0) + (down ? scrollingUnit : 0); + scrollMap(dx, dy); + } + private class ScreenOffReceiver extends BroadcastReceiver { @Override diff --git a/OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java new file mode 100644 index 0000000000..8026ea7632 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java @@ -0,0 +1,187 @@ +package net.osmand.plus.helpers; + +import android.view.KeyEvent; + +import net.osmand.plus.OsmandApplication; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ScrollHelper { + + private final static int LONG_PRESS_TIME_MS = 250; + private final static int MAX_KEY_UP_TIME_MS = 10; + private final static int REFRESHING_DELAY_MS = 3; + private final static int INVALID_VALUE = -1; + + private OsmandApplication app; + private OnScrollEventListener onScrollEventListener; + + private final Direction UP = new Direction(KeyEvent.KEYCODE_DPAD_UP); + private final Direction DOWN = new Direction(KeyEvent.KEYCODE_DPAD_DOWN); + private final Direction LEFT = new Direction(KeyEvent.KEYCODE_DPAD_LEFT); + private final Direction RIGHT = new Direction(KeyEvent.KEYCODE_DPAD_RIGHT); + + private final Map availableDirections; + private boolean isInContinuousScrolling = false; + private long startContinuousScrollingTime = INVALID_VALUE; + + private Runnable scrollingRunnable = new Runnable() { + @Override + public void run() { + isInContinuousScrolling = true; + while (hasActiveDirections()) { + app.runInUIThread(new Runnable() { + @Override + public void run() { + notifyListener(true); + } + }); + try { + Thread.sleep(REFRESHING_DELAY_MS); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + isInContinuousScrolling = false; + } + }; + + public ScrollHelper(OsmandApplication app) { + this.app = app; + + availableDirections = new HashMap() { + { + put(UP.keyCode, UP); + put(DOWN.keyCode, DOWN); + put(LEFT.keyCode, LEFT); + put(RIGHT.keyCode, RIGHT); + } + }; + } + + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (isInContinuousScrolling) { + addDirection(keyCode); + } else { + startScrolling(keyCode); + return true; + } + return true; + } + + public boolean onKeyUp(int keyCode, KeyEvent event) { + removeDirection(keyCode); + boolean shortPress = !hasActiveDirections() && ((System.currentTimeMillis() - startContinuousScrollingTime) < LONG_PRESS_TIME_MS); + if (shortPress) { + List lastDirections = getLastDirections(); + addDirections(lastDirections); + notifyListener(false); + removeDirections(lastDirections); + } + return true; + } + + public void startScrolling(int keyCode) { + startContinuousScrollingTime = System.currentTimeMillis(); + addDirection(keyCode); + if (!isInContinuousScrolling) { + new Thread(scrollingRunnable).start(); + } + } + + public void addDirections(List directions) { + for (Direction direction : directions) { + direction.setActive(true); + } + } + + public void removeDirections(List directions) { + for (Direction direction : directions) { + direction.setActive(false); + direction.setTimeUp(INVALID_VALUE); + } + } + + public void addDirection(int keyCode) { + if (availableDirections.containsKey(keyCode)) { + availableDirections.get(keyCode).setActive(true); + } + } + + public void removeDirection(int keyCode) { + if (availableDirections.containsKey(keyCode)) { + long keyUpTime = System.currentTimeMillis(); + Direction direction = availableDirections.get(keyCode); + direction.setTimeUp(keyUpTime); + direction.setActive(false); + } + } + + private boolean hasActiveDirections() { + for (Direction direction : availableDirections.values()) { + if (direction.isActive()) { + return true; + } + } + return false; + } + + private void notifyListener(boolean continuousScrolling) { + if (onScrollEventListener != null) { + onScrollEventListener.onScrollEvent(continuousScrolling, + UP.isActive(), DOWN.isActive(), LEFT.isActive(), RIGHT.isActive()); + } + } + + public void setListener(OnScrollEventListener onScrollEventListener) { + this.onScrollEventListener = onScrollEventListener; + } + + public boolean isScrollingDirectionKeyCode(int keyCode) { + return availableDirections.containsKey(keyCode); + } + + public List getLastDirections() { + List directions = new ArrayList<>(); + for (Direction direction : availableDirections.values()) { + if (System.currentTimeMillis() - direction.getTimeUp() <= MAX_KEY_UP_TIME_MS) { + directions.add(direction); + } + } + return directions; + } + + private static class Direction { + private final int keyCode; + private long timeUp = INVALID_VALUE; + private boolean isActive; + + public Direction(int keyCode) { + this.keyCode = keyCode; + } + + public long getTimeUp() { + return timeUp; + } + + public void setTimeUp(long timeUp) { + this.timeUp = timeUp; + } + + public boolean isActive() { + return isActive; + } + + public void setActive(boolean active) { + isActive = active; + } + } + + public interface OnScrollEventListener { + void onScrollEvent(boolean continuousScrolling, boolean up, boolean down, boolean left, boolean right); + } + +} \ No newline at end of file From ad427985b2ce7d9efb5826170d6e2f105b91f9e5 Mon Sep 17 00:00:00 2001 From: Nazar Date: Fri, 14 Feb 2020 16:20:30 +0200 Subject: [PATCH 010/120] Fix "gray bar at the bottom of the screen" --- .../mapcontextmenu/editors/PointEditorFragment.java | 9 ++++----- .../osmand/plus/profiles/EditProfilesFragment.java | 10 +++++----- .../plus/quickaction/QuickActionListFragment.java | 11 ++++++----- .../osmand/plus/settings/BaseSettingsFragment.java | 9 +++------ 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java index 81b5166d85..649f6d8787 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java @@ -167,6 +167,10 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment { descriptionEdit.setHint(R.string.access_hint_enter_description); } + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, view); + } + return view; } @@ -234,11 +238,6 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment { return R.color.status_bar_color_light; } - @Override - protected boolean isFullScreenAllowed() { - return false; - } - private void hideKeyboard() { FragmentActivity activity = getActivity(); if (activity != null) { diff --git a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java index fa2901b583..e81d4fbfda 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java @@ -2,6 +2,7 @@ package net.osmand.plus.profiles; import android.annotation.SuppressLint; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -174,12 +175,11 @@ public class EditProfilesFragment extends BaseOsmAndFragment { } }); - return mainView; - } + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, mainView); + } - @Override - protected boolean isFullScreenAllowed() { - return false; + return mainView; } @Override diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java index 998a1464a1..a64cc46979 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java @@ -3,6 +3,7 @@ package net.osmand.plus.quickaction; import android.content.DialogInterface; import android.content.res.Resources; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -24,6 +25,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; @@ -73,6 +75,10 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick } }); + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(getContext(), view); + } + return view; } @@ -145,11 +151,6 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick quickActionRegistry.setUpdatesListener(null); } - @Override - protected boolean isFullScreenAllowed() { - return false; - } - @Override public int getStatusBarColorId() { return isLightContent ? R.color.status_bar_color_light : R.color.status_bar_color_dark; diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index ec9863482e..af4b019860 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -178,6 +178,9 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl createToolbar(inflater, view); setDivider(null); view.setBackgroundColor(ContextCompat.getColor(app, getBackgroundColorRes())); + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, view); + } } return view; } @@ -250,9 +253,6 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId)); } } - if (activity instanceof MapActivity) { - ((MapActivity) activity).exitFromFullScreen(getView()); - } } } } @@ -271,9 +271,6 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl if (!(activity instanceof MapActivity) && statusBarColor != -1) { activity.getWindow().setStatusBarColor(statusBarColor); } - if (activity instanceof MapActivity) { - ((MapActivity) activity).enterToFullScreen(); - } } } } From 7d5e139210a3c361fc8c7f5e7191ef9ed93fecad Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 14 Feb 2020 16:53:25 +0200 Subject: [PATCH 011/120] Preferences ui fixes --- .../plus/profiles/SelectProfileBottomSheetDialogFragment.java | 4 ++-- OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java | 4 ++-- .../net/osmand/plus/settings/ProfileAppearanceFragment.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java index f968291d6e..52e7d56d75 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java @@ -181,7 +181,7 @@ public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialo int activeColorResId = nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light; int iconDefaultColorResId = nightMode ? R.color.icon_color_default_dark : R.color.icon_color_default_light; - View itemView = View.inflate(getContext(), R.layout.bottom_sheet_item_with_descr_and_radio_btn, null); + View itemView = UiUtilities.getInflater(getContext(), nightMode).inflate(R.layout.bottom_sheet_item_with_descr_and_radio_btn, null); TextView tvTitle = itemView.findViewById(R.id.title); TextView tvDescription = itemView.findViewById(R.id.description); ImageView ivIcon = itemView.findViewById(R.id.icon); @@ -239,7 +239,7 @@ public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialo if (type.equals(TYPE_NAV_PROFILE)) { profiles.addAll(NavigationFragment.getSortedRoutingProfiles(app)); } else if (type.equals(TYPE_BASE_APP_PROFILE)) { - profiles.addAll(NavigationFragment.getBaseProfiles(app)); + profiles.addAll(NavigationFragment.getBaseProfiles()); } else { LOG.error("Check data type!"); dismiss(); diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 38a6dbccf9..2bcf275ae3 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -241,9 +241,9 @@ public class NavigationFragment extends BaseSettingsFragment { return profilesObjects; } - public static List getBaseProfiles(Context ctx) { + public static List getBaseProfiles() { List profiles = new ArrayList<>(); - for (ApplicationMode mode : ApplicationMode.getDefaultValues()) { + for (ApplicationMode mode : ApplicationMode.allPossibleValues()) { if (mode != ApplicationMode.DEFAULT) { profiles.add(new ProfileDataObject(mode.toHumanString(), mode.getDescription(), mode.getStringKey(), mode.getIconRes(), false, mode.getIconColorInfo())); diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index 7db17b5c5e..81a9261487 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -348,7 +348,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { selectNavTypeBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - if (getSelectedAppMode().isCustomProfile()) { + if (isNewProfile) { hideKeyboard(); final SelectProfileBottomSheetDialogFragment fragment = new SelectProfileBottomSheetDialogFragment(); Bundle bundle = new Bundle(); From 52b79b7f6e4ba97daa8f146c0e952ac3f57ce767 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 14 Feb 2020 17:21:48 +0200 Subject: [PATCH 012/120] Fix select profile theme bug --- .../SelectProfileBottomSheetDialogFragment.java | 6 +++--- .../osmand/plus/settings/MainSettingsFragment.java | 2 ++ .../net/osmand/plus/settings/NavigationFragment.java | 12 +++++++----- .../plus/settings/ProfileAppearanceFragment.java | 2 ++ .../bottomsheets/BasePreferenceBottomSheet.java | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java index 52e7d56d75..6b737143b7 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/SelectProfileBottomSheetDialogFragment.java @@ -22,7 +22,6 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem; @@ -30,6 +29,7 @@ import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.settings.MainSettingsFragment; import net.osmand.plus.settings.NavigationFragment; import net.osmand.plus.settings.ProfileAppearanceFragment; +import net.osmand.plus.settings.bottomsheets.BasePreferenceBottomSheet; import org.apache.commons.logging.Log; @@ -38,7 +38,7 @@ import java.util.List; import static net.osmand.plus.helpers.ImportHelper.ImportType.ROUTING; -public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialogFragment { +public class SelectProfileBottomSheetDialogFragment extends BasePreferenceBottomSheet { private static final Log LOG = PlatformUtil .getLog(SelectProfileBottomSheetDialogFragment.class); @@ -239,7 +239,7 @@ public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialo if (type.equals(TYPE_NAV_PROFILE)) { profiles.addAll(NavigationFragment.getSortedRoutingProfiles(app)); } else if (type.equals(TYPE_BASE_APP_PROFILE)) { - profiles.addAll(NavigationFragment.getBaseProfiles()); + profiles.addAll(NavigationFragment.getBaseProfiles(app)); } else { LOG.error("Check data type!"); dismiss(); diff --git a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java index 8c7c50a435..ca6f0dcdab 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java @@ -118,6 +118,8 @@ public class MainSettingsFragment extends BaseSettingsFragment { Bundle bundle = new Bundle(); bundle.putString(DIALOG_TYPE, TYPE_BASE_APP_PROFILE); dialog.setArguments(bundle); + dialog.setUsedOnMap(false); + dialog.setAppMode(getSelectedAppMode()); if (getActivity() != null) { getActivity().getSupportFragmentManager().beginTransaction() .add(dialog, "select_base_profile").commitAllowingStateLoss(); diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 2bcf275ae3..ba7b3ab808 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -1,12 +1,9 @@ package net.osmand.plus.settings; -import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v7.preference.Preference; import android.support.v7.preference.SwitchPreferenceCompat; -import android.view.LayoutInflater; -import android.view.View; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmandApplication; @@ -113,6 +110,7 @@ public class NavigationFragment extends BaseSettingsFragment { bundle.putString(DIALOG_TYPE, TYPE_NAV_PROFILE); dialog.setArguments(bundle); dialog.setUsedOnMap(false); + dialog.setAppMode(getSelectedAppMode()); if (getActivity() != null) { getActivity().getSupportFragmentManager().beginTransaction() .add(dialog, "select_nav_type").commitAllowingStateLoss(); @@ -241,11 +239,15 @@ public class NavigationFragment extends BaseSettingsFragment { return profilesObjects; } - public static List getBaseProfiles() { + public static List getBaseProfiles(OsmandApplication app) { List profiles = new ArrayList<>(); for (ApplicationMode mode : ApplicationMode.allPossibleValues()) { if (mode != ApplicationMode.DEFAULT) { - profiles.add(new ProfileDataObject(mode.toHumanString(), mode.getDescription(), + String description = mode.getDescription(); + if (Algorithms.isEmpty(description)) { + description = getAppModeDescription(app, mode); + } + profiles.add(new ProfileDataObject(mode.toHumanString(), description, mode.getStringKey(), mode.getIconRes(), false, mode.getIconColorInfo())); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index 81a9261487..c2c4f25439 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -352,6 +352,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { hideKeyboard(); final SelectProfileBottomSheetDialogFragment fragment = new SelectProfileBottomSheetDialogFragment(); Bundle bundle = new Bundle(); + fragment.setUsedOnMap(false); + fragment.setAppMode(getSelectedAppMode()); if (getSelectedAppMode() != null) { bundle.putString(SELECTED_KEY, getSelectedAppMode().getRoutingProfile()); } diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java index f6ae08a36c..c40c2739dd 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BasePreferenceBottomSheet.java @@ -24,7 +24,7 @@ public abstract class BasePreferenceBottomSheet extends MenuBottomSheetDialogFra private ApplicationMode appMode; private boolean profileDependent; - protected void setAppMode(ApplicationMode appMode) { + public void setAppMode(ApplicationMode appMode) { this.appMode = appMode; } From a577b25b867aa4ceba13bf9f9f458a900678f5d7 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Fri, 14 Feb 2020 17:52:35 +0200 Subject: [PATCH 013/120] fix settings --- OsmAnd/res/values/strings.xml | 2 ++ .../osmand/access/AccessibilityPlugin.java | 2 -- .../access/AccessibilitySettingsFragment.java | 21 ++++++-------- .../access/SettingsAccessibilityActivity.java | 6 ---- .../src/net/osmand/plus/OsmandSettings.java | 16 ++++++++-- .../osmand/plus/routing/RoutingHelper.java | 16 +++++----- .../settings/RouteParametersFragment.java | 23 +++++++++++---- .../src/net/osmand/plus/views/RouteLayer.java | 29 ++++++++++--------- 8 files changed, 65 insertions(+), 50 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 417516e7b0..722683d322 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,8 @@ Thx - Hardy --> + %s (Routing Default) + App Default (%s) Please provide a name for the profile Disable recalculation Open settings diff --git a/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java b/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java index 1eb0cea4f1..6f3472d425 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java +++ b/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java @@ -33,8 +33,6 @@ public class AccessibilityPlugin extends OsmandPlugin { pluginPreferences.add(settings.SPEECH_RATE); pluginPreferences.add(settings.ACCESSIBILITY_SMART_AUTOANNOUNCE); pluginPreferences.add(settings.ACCESSIBILITY_AUTOANNOUNCE_PERIOD); - pluginPreferences.add(settings.DISABLE_OFFROUTE_RECALC); - pluginPreferences.add(settings.DISABLE_WRONG_DIRECTION_RECALC); pluginPreferences.add(settings.DIRECTION_STYLE); pluginPreferences.add(settings.DIRECTION_AUDIO_FEEDBACK); pluginPreferences.add(settings.DIRECTION_HAPTIC_FEEDBACK); diff --git a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java index 79dc363de3..5b39741b61 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java +++ b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java @@ -64,9 +64,6 @@ public class AccessibilitySettingsFragment extends BaseSettingsFragment implemen setupSmartAutoAnnouncePref(); setupAutoAnnouncePeriodPref(); - setupDisableOffRouteRecalculationPref(); - setupDisableWrongDirectionRecalculationPref(); - setupDirectionStylePref(); setupDirectionAudioFeedbackPref(); setupDirectionHapticFeedbackPref(); @@ -175,15 +172,15 @@ public class AccessibilitySettingsFragment extends BaseSettingsFragment implemen autoAnnouncePeriod.setDescription(R.string.access_autoannounce_period_descr); } - private void setupDisableOffRouteRecalculationPref() { - SwitchPreferenceEx disableOffRouteRecalculation = (SwitchPreferenceEx) findPreference(settings.DISABLE_OFFROUTE_RECALC.getId()); - disableOffRouteRecalculation.setDescription(getString(R.string.access_disable_offroute_recalc_descr)); - } - - private void setupDisableWrongDirectionRecalculationPref() { - SwitchPreferenceEx disableWrongDirectionRecalculation = (SwitchPreferenceEx) findPreference(settings.DISABLE_WRONG_DIRECTION_RECALC.getId()); - disableWrongDirectionRecalculation.setDescription(getString(R.string.access_disable_wrong_direction_recalc_descr)); - } +// private void setupDisableOffRouteRecalculationPref() { +// SwitchPreferenceEx disableOffRouteRecalculation = (SwitchPreferenceEx) findPreference(settings.DISABLE_OFFROUTE_RECALC.getId()); +// disableOffRouteRecalculation.setDescription(getString(R.string.access_disable_offroute_recalc_descr)); +// } +// +// private void setupDisableWrongDirectionRecalculationPref() { +// SwitchPreferenceEx disableWrongDirectionRecalculation = (SwitchPreferenceEx) findPreference(settings.DISABLE_WRONG_DIRECTION_RECALC.getId()); +// disableWrongDirectionRecalculation.setDescription(getString(R.string.access_disable_wrong_direction_recalc_descr)); +// } private void setupDirectionStylePref() { RelativeDirectionStyle[] relativeDirectionStyles = RelativeDirectionStyle.values(); diff --git a/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java b/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java index e3ab2b4c0a..719ed05863 100644 --- a/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java +++ b/OsmAnd/src/net/osmand/access/SettingsAccessibilityActivity.java @@ -90,12 +90,6 @@ public class SettingsAccessibilityActivity extends SettingsBaseActivity { } }); cat.addPreference(autoannouncePeriodPreference); - - cat.addPreference(createCheckBoxPreference(settings.DISABLE_OFFROUTE_RECALC, R.string.access_disable_offroute_recalc, - R.string.access_disable_offroute_recalc_descr)); - cat.addPreference(createCheckBoxPreference(settings.DISABLE_WRONG_DIRECTION_RECALC, R.string.access_disable_wrong_direction_recalc, - R.string.access_disable_wrong_direction_recalc_descr)); - cat.addPreference(createCheckBoxPreference(settings.DIRECTION_AUDIO_FEEDBACK, R.string.access_direction_audio_feedback, R.string.access_direction_audio_feedback_descr)); cat.addPreference(createCheckBoxPreference(settings.DIRECTION_HAPTIC_FEEDBACK, R.string.access_direction_haptic_feedback, diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index df456864b0..dc4b4c7bd8 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1606,8 +1606,8 @@ public class OsmandSettings { new BooleanAccessibilityPreference("disable_offroute_recalc", false).makeProfile(); // this value string is synchronized with settings_pref.xml preference name - public final OsmandPreference DISABLE_WRONG_DIRECTION_RECALC = - new BooleanAccessibilityPreference("disable_wrong_direction_recalc", false).makeProfile(); +// public final OsmandPreference DISABLE_WRONG_DIRECTION_RECALC = +// new BooleanAccessibilityPreference("disable_wrong_direction_recalc", false).makeProfile(); // this value string is synchronized with settings_pref.xml preference name public final OsmandPreference DIRECTION_AUDIO_FEEDBACK = @@ -3285,8 +3285,18 @@ public class OsmandSettings { public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 0.f){ @Override public Float getProfileDefaultValue(ApplicationMode mode) { - if (mode.getRouteService() == RouteService.DIRECT_TO) { + if (DISABLE_OFFROUTE_RECALC.getModeValue(mode)) { return -1.0f; + } else if (mode.getRouteService() == RouteService.DIRECT_TO) { + DISABLE_OFFROUTE_RECALC.setModeValue(mode, true); + return -1.0f; + } else if (mode.getRouteService() == RouteService.STRAIGHT) { + MetricsConstants mc = METRIC_SYSTEM.getModeValue(mode); + if (mc == MetricsConstants.KILOMETERS_AND_METERS || mc ==MetricsConstants.MILES_AND_METERS) { + return 500.f; + } else { + return 482.0f; + } } return super.getProfileDefaultValue(mode); } diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 47cdc1b31c..f4a06d30d3 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -438,13 +438,12 @@ public class RoutingHelper { } List routeNodes = route.getImmutableAllLocations(); int currentRoute = route.currentRoute; - + double allowableDeviation = route.routeRecalcDistance == 0 ? (2 * posTolerance) : route.routeRecalcDistance; // 2. Analyze if we need to recalculate route // >100m off current route (sideways) or parameter (for Straight line) - if (currentRoute > 0 && route.getRouteRecalcDistance() >= 0.f) { - double allowableDeviation = route.routeRecalcDistance == 0 ? (1.7 * posTolerance) : route.routeRecalcDistance; + if (currentRoute > 0 && route.getRouteRecalcDistance() >= 0.f && !settings.DISABLE_OFFROUTE_RECALC.get()) { distOrth = getOrthogonalDistance(currentLocation, routeNodes.get(currentRoute - 1), routeNodes.get(currentRoute)); - if ((!settings.DISABLE_OFFROUTE_RECALC.get()) && (distOrth > allowableDeviation)) { + if (distOrth > allowableDeviation) { log.info("Recalculate route, because correlation : " + distOrth); //$NON-NLS-1$ isDeviatedFromRoute = true; calculateRoute = true; @@ -453,9 +452,8 @@ public class RoutingHelper { // 3. Identify wrong movement direction Location next = route.getNextRouteLocation(); boolean wrongMovementDirection = checkWrongMovementDirection(currentLocation, next); - double allowableDeviation = route.routeRecalcDistance == 0.f ? (2 * posTolerance) : route.routeRecalcDistance; - if ((!settings.DISABLE_WRONG_DIRECTION_RECALC.get()) && wrongMovementDirection - && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > allowableDeviation) && route.getRouteRecalcDistance() >= 0) { + if (!settings.DISABLE_OFFROUTE_RECALC.get() && wrongMovementDirection + && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > allowableDeviation)) { log.info("Recalculate route, because wrong movement direction: " + currentLocation.distanceTo(routeNodes.get(currentRoute))); //$NON-NLS-1$ isDeviatedFromRoute = true; calculateRoute = true; @@ -471,11 +469,11 @@ public class RoutingHelper { if (!inRecalc && !wrongMovementDirection) { voiceRouter.updateStatus(currentLocation, false); voiceRouterStopped = false; - } else if (isDeviatedFromRoute && !voiceRouterStopped && route.getRouteRecalcDistance() >= 0.f) { + } else if (isDeviatedFromRoute && !voiceRouterStopped && !settings.DISABLE_OFFROUTE_RECALC.get()) { voiceRouter.interruptRouteCommands(); voiceRouterStopped = true; // Prevents excessive execution of stop() code } - if (distOrth > mode.getOffRouteDistance() && route.getRouteRecalcDistance() >= 0.f) { + if (distOrth > mode.getOffRouteDistance() && !settings.DISABLE_OFFROUTE_RECALC.get()) { voiceRouter.announceOffRoute(distOrth); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 05907ae893..8376a585d3 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -7,9 +7,9 @@ import android.support.v4.content.ContextCompat; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceScreen; import android.support.v7.preference.PreferenceViewHolder; -import android.text.SpannableStringBuilder; import android.widget.ImageView; +import net.osmand.Location; import net.osmand.StateChangedListener; import net.osmand.plus.ApplicationMode; import net.osmand.plus.OsmAndFormatter; @@ -140,14 +140,16 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP ApplicationMode am = getSelectedAppMode(); + float posTolerance = app.getRoutingHelper().getPosTolerance(new Location("")); if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); if (am.getRouteService() == RouteProvider.RouteService.STRAIGHT) { - setupSelectRouteRecalcDistance(screen, 1); + setupSelectRouteRecalcDistance(screen, 8, posTolerance); } else if (am.getRouteService() == RouteProvider.RouteService.DIRECT_TO) { - setupSelectRouteRecalcDistance(screen, 0); + setupSelectRouteRecalcDistance(screen, 0, posTolerance); } } else { + setupSelectRouteRecalcDistance(screen, 1, posTolerance); GeneralRouter router = getRouter(getMyApplication().getRoutingConfig(), am); clearParameters(); if (router != null) { @@ -236,7 +238,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } } - private void setupSelectRouteRecalcDistance(PreferenceScreen screen, int defaultValue) { + private void setupSelectRouteRecalcDistance(PreferenceScreen screen, int defaultValue, float posTolerance) { Float[] entryValues; OsmandSettings settings = app.getSettings(); OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.get(); @@ -248,11 +250,16 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP String[] entries = new String[entryValues.length]; entries[0] = getString(R.string.no_recalculation_setting); - entries[1] = getString(R.string.shared_string_default); + entries[1] = String.format(getString(R.string.shared_string_app_default_w_val), OsmAndFormatter.getFormattedDistance(posTolerance * 2, app, false)); for (int i = 2; i < entryValues.length; i++) { entries[i] = OsmAndFormatter.getFormattedDistance(entryValues[i], app, false); } + + if (defaultValue != 1) { + entries[defaultValue] = String.format(getString(R.string.shared_string_routing_default_w_val), defaultValue == 0 ? getString(R.string.no_recalculation_setting) : entries[defaultValue]); + } + ListPreferenceEx routeRecalculationDist = createListPreferenceEx(settings.ROUTE_RECALCULATION_DISTANCE.getId(), entries, entryValues, R.string.route_recalculation_dist_title, R.layout.preference_with_descr); @@ -330,6 +337,12 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP return true; } else if ("prouting_short_way".equals(key) && newValue instanceof Boolean) { return app.getSettings().FAST_ROUTE_MODE.setModeValue(getSelectedAppMode(), !(Boolean) newValue); + } else if (settings.ROUTE_RECALCULATION_DISTANCE.getId().equals(key) && newValue instanceof Float) { + if ((float) newValue == -1.f) { + settings.DISABLE_OFFROUTE_RECALC.setModeValue(getSelectedAppMode(), true); + } else { + settings.DISABLE_OFFROUTE_RECALC.setModeValue(getSelectedAppMode(), false); + } } return super.onPreferenceChange(preference, newValue); diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index f621951805..71028fa101 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -1116,21 +1116,24 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont int currentRoute = route == null ? 0 : route.getCurrentRoute(); Location pointToReturn = null; if (route != null && currentRoute > 0 && route.getRouteRecalcDistance() > 0) { + Location currentLoc = helper.getApplication().getLocationProvider().getLastKnownLocation(); final Location from = routeGeometry.locations.get(currentRoute - 1); final Location to = routeGeometry.locations.get(currentRoute); - final LatLon projection = MapUtils.getProjection(currentLoc.getLatitude(), - currentLoc.getLongitude(), from.getLatitude(), from.getLongitude(), - to.getLatitude(), to.getLongitude()); - - final double deviation = MapUtils.getDistance(projection.getLatitude(), projection.getLongitude(), currentLoc.getLatitude(), currentLoc.getLongitude()); - if (deviation < route.getRouteRecalcDistance()) { - double distFromProjectionToEnd = Math.sqrt(Math.pow(to.getLatitude() - projection.getLatitude(), 2) + Math.pow(to.getLongitude() - projection.getLongitude(), 2)); - double coef = deviation / distFromProjectionToEnd; - pointToReturn = new Location("route_layer"); - pointToReturn.setLatitude(projection.getLatitude() + (to.getLatitude() - projection.getLatitude()) * coef); - pointToReturn.setLongitude(projection.getLongitude() + (to.getLongitude() - projection.getLatitude()) * coef); - //how to draw line to this point from lastProjection?! - } +// final LatLon projection = MapUtils.getProjection(currentLoc.getLatitude(), +// currentLoc.getLongitude(), from.getLatitude(), from.getLongitude(), +// to.getLatitude(), to.getLongitude()); +// +// final double deviation = MapUtils.getDistance(projection.getLatitude(), projection.getLongitude(), currentLoc.getLatitude(), currentLoc.getLongitude()); +// if (deviation < route.getRouteRecalcDistance()) { +// double distFromProjectionToEnd = Math.sqrt(Math.pow(to.getLatitude() - projection.getLatitude(), 2) + Math.pow(to.getLongitude() - projection.getLongitude(), 2)); +// double coef = deviation / distFromProjectionToEnd; +// pointToReturn = new Location("route_layer"); +// pointToReturn.setLatitude(projection.getLatitude() + (to.getLatitude() - projection.getLatitude()) * coef); +// pointToReturn.setLongitude(projection.getLongitude() + (to.getLongitude() - projection.getLatitude()) * coef); +// } +// if (pointToReturn != null) { +// drawProjectionPoint(canvas, new double[]{tb.getPixXFromLonNoRot(pointToReturn.getLongitude()), tb.getPixYFromLatNoRot(pointToReturn.getLatitude())}); +// } } routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, From b72678ddac554091bde1425a2f9c2fce853f1f3a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 14 Feb 2020 18:37:17 +0200 Subject: [PATCH 014/120] Fix custom parent ui --- .../osmand/plus/settings/ProfileAppearanceFragment.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index c2c4f25439..8c950fea45 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -634,11 +634,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { } private void setupBaseProfileView(String stringKey) { - for (ApplicationMode am : ApplicationMode.getDefaultValues()) { - if (am.getStringKey().equals(stringKey)) { - baseProfileName.setText(Algorithms.capitalizeFirstLetter(am.toHumanString())); - } - } + ApplicationMode mode = ApplicationMode.valueOfStringKey(stringKey, ApplicationMode.DEFAULT); + baseProfileName.setText(Algorithms.capitalizeFirstLetter(mode.toHumanString())); } private boolean saveProfile() { From 116673f0817d3d621ac31a937e0a209764cc0104 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 14 Feb 2020 18:03:35 +0100 Subject: [PATCH 015/120] Fix settings --- .../src/net/osmand/plus/OsmandSettings.java | 17 -------- .../plus/routing/RouteCalculationResult.java | 4 +- .../osmand/plus/routing/RoutingHelper.java | 43 +++++++++++++++---- .../settings/RouteParametersFragment.java | 19 +++----- .../src/net/osmand/plus/views/RouteLayer.java | 6 +-- 5 files changed, 46 insertions(+), 43 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index dc4b4c7bd8..25fcca6266 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3283,23 +3283,6 @@ public class OsmandSettings { } public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 0.f){ - @Override - public Float getProfileDefaultValue(ApplicationMode mode) { - if (DISABLE_OFFROUTE_RECALC.getModeValue(mode)) { - return -1.0f; - } else if (mode.getRouteService() == RouteService.DIRECT_TO) { - DISABLE_OFFROUTE_RECALC.setModeValue(mode, true); - return -1.0f; - } else if (mode.getRouteService() == RouteService.STRAIGHT) { - MetricsConstants mc = METRIC_SYSTEM.getModeValue(mode); - if (mc == MetricsConstants.KILOMETERS_AND_METERS || mc ==MetricsConstants.MILES_AND_METERS) { - return 500.f; - } else { - return 482.0f; - } - } - return super.getProfileDefaultValue(mode); - } }.makeProfile(); public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference("enable_osmc_routing", true).makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 6fe1bc2aff..11741dd54a 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -65,7 +65,7 @@ public class RouteCalculationResult { protected ApplicationMode appMode; protected boolean showOriginalRoute = false; - protected float routeRecalcDistance = 0.f; + protected double routeRecalcDistance = 0.d; public RouteCalculationResult(String errorMessage) { this.errorMessage = errorMessage; @@ -238,7 +238,7 @@ public class RouteCalculationResult { } } - public float getRouteRecalcDistance() { + public double getRouteRecalcDistance() { return routeRecalcDistance; } diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index f4a06d30d3..8d5a6a2178 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -42,6 +42,7 @@ public class RoutingHelper { private static final float POSITION_TOLERANCE = 60; private static final int CACHE_RADIUS = 100000; + public static final float ALLOWED_DEVIATION = 2; private List> listeners = new LinkedList<>(); private List> updateListeners = new LinkedList<>(); @@ -398,9 +399,30 @@ public class RoutingHelper { return getOrthogonalDistance(lastFixedLocation, routeNodes.get(route.currentRoute -1), routeNodes.get(route.currentRoute)); } - public float getPosTolerance(Location currentLocation) { - if(currentLocation.hasAccuracy()) { - return POSITION_TOLERANCE / 2 + currentLocation.getAccuracy(); + + public static float getDefaultAllowedDeviation(OsmandSettings settings, float posTolerance) { + ApplicationMode mode = settings.getApplicationMode(); + + if (settings.DISABLE_OFFROUTE_RECALC.getModeValue(mode)) { + return -1.0f; + } else if (mode.getRouteService() == RouteService.DIRECT_TO) { + settings.DISABLE_OFFROUTE_RECALC.setModeValue(mode, true); + return -1.0f; + } else if (mode.getRouteService() == RouteService.STRAIGHT) { + OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.getModeValue(mode); + if (mc == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS || mc == OsmandSettings.MetricsConstants.MILES_AND_METERS) { + return 500.f; + } else { + // 1500 ft + return 457.2f; + } + } + return posTolerance * ALLOWED_DEVIATION; + } + + public static float getPosTolerance(float accuracy) { + if(accuracy > 0) { + return POSITION_TOLERANCE / 2 + accuracy; } return POSITION_TOLERANCE; } @@ -420,7 +442,7 @@ public class RoutingHelper { isDeviatedFromRoute = false; return locationProjection; } - float posTolerance = getPosTolerance(currentLocation); + float posTolerance = getPosTolerance(currentLocation.hasAccuracy() ? currentLocation.getAccuracy() : 0); boolean calculateRoute = false; synchronized (this) { isDeviatedFromRoute = false; @@ -438,10 +460,13 @@ public class RoutingHelper { } List routeNodes = route.getImmutableAllLocations(); int currentRoute = route.currentRoute; - double allowableDeviation = route.routeRecalcDistance == 0 ? (2 * posTolerance) : route.routeRecalcDistance; + double allowableDeviation = route.getRouteRecalcDistance(); + if (allowableDeviation == 0) { + allowableDeviation = getDefaultAllowedDeviation(settings, posTolerance); + } // 2. Analyze if we need to recalculate route // >100m off current route (sideways) or parameter (for Straight line) - if (currentRoute > 0 && route.getRouteRecalcDistance() >= 0.f && !settings.DISABLE_OFFROUTE_RECALC.get()) { + if (currentRoute > 0 && allowableDeviation > 0) { distOrth = getOrthogonalDistance(currentLocation, routeNodes.get(currentRoute - 1), routeNodes.get(currentRoute)); if (distOrth > allowableDeviation) { log.info("Recalculate route, because correlation : " + distOrth); //$NON-NLS-1$ @@ -452,7 +477,7 @@ public class RoutingHelper { // 3. Identify wrong movement direction Location next = route.getNextRouteLocation(); boolean wrongMovementDirection = checkWrongMovementDirection(currentLocation, next); - if (!settings.DISABLE_OFFROUTE_RECALC.get() && wrongMovementDirection + if (allowableDeviation > 0 && wrongMovementDirection && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > allowableDeviation)) { log.info("Recalculate route, because wrong movement direction: " + currentLocation.distanceTo(routeNodes.get(currentRoute))); //$NON-NLS-1$ isDeviatedFromRoute = true; @@ -547,7 +572,7 @@ public class RoutingHelper { return index; } - private boolean updateCurrentRouteStatus(Location currentLocation, float posTolerance) { + private boolean updateCurrentRouteStatus(Location currentLocation, double posTolerance) { List routeNodes = route.getImmutableAllLocations(); int currentRoute = route.currentRoute; // 1. Try to proceed to next point using orthogonal distance (finding minimum orthogonal dist) @@ -685,7 +710,7 @@ public class RoutingHelper { } - private boolean identifyUTurnIsNeeded(Location currentLocation, float posTolerance) { + private boolean identifyUTurnIsNeeded(Location currentLocation, double posTolerance) { if (finalLocation == null || currentLocation == null || !route.isCalculated() || isPublicTransportMode()) { return false; } diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 8376a585d3..111ae75948 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -140,16 +140,12 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP ApplicationMode am = getSelectedAppMode(); - float posTolerance = app.getRoutingHelper().getPosTolerance(new Location("")); + float posTolerance = (float) RoutingHelper.getDefaultAllowedDeviation(settings, RoutingHelper.getPosTolerance(0)); if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); - if (am.getRouteService() == RouteProvider.RouteService.STRAIGHT) { - setupSelectRouteRecalcDistance(screen, 8, posTolerance); - } else if (am.getRouteService() == RouteProvider.RouteService.DIRECT_TO) { - setupSelectRouteRecalcDistance(screen, 0, posTolerance); - } + setupSelectRouteRecalcDistance(screen, posTolerance); } else { - setupSelectRouteRecalcDistance(screen, 1, posTolerance); + setupSelectRouteRecalcDistance(screen, posTolerance); GeneralRouter router = getRouter(getMyApplication().getRoutingConfig(), am); clearParameters(); if (router != null) { @@ -238,7 +234,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } } - private void setupSelectRouteRecalcDistance(PreferenceScreen screen, int defaultValue, float posTolerance) { + private void setupSelectRouteRecalcDistance(PreferenceScreen screen, float posTolerance) { Float[] entryValues; OsmandSettings settings = app.getSettings(); OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.get(); @@ -250,15 +246,14 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP String[] entries = new String[entryValues.length]; entries[0] = getString(R.string.no_recalculation_setting); - entries[1] = String.format(getString(R.string.shared_string_app_default_w_val), OsmAndFormatter.getFormattedDistance(posTolerance * 2, app, false)); + String defaultDistance = OsmAndFormatter.getFormattedDistance(settings.ROUTE_RECALCULATION_DISTANCE.getProfileDefaultValue(settings.getApplicationMode()), + app, false); + entries[1] = String.format(getString(R.string.shared_string_app_default_w_val), defaultDistance); for (int i = 2; i < entryValues.length; i++) { entries[i] = OsmAndFormatter.getFormattedDistance(entryValues[i], app, false); } - if (defaultValue != 1) { - entries[defaultValue] = String.format(getString(R.string.shared_string_routing_default_w_val), defaultValue == 0 ? getString(R.string.no_recalculation_setting) : entries[defaultValue]); - } ListPreferenceEx routeRecalculationDist = createListPreferenceEx(settings.ROUTE_RECALCULATION_DISTANCE.getId(), entries, entryValues, R.string.route_recalculation_dist_title, R.layout.preference_with_descr); diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 71028fa101..53100e6f8f 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -1116,9 +1116,9 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont int currentRoute = route == null ? 0 : route.getCurrentRoute(); Location pointToReturn = null; if (route != null && currentRoute > 0 && route.getRouteRecalcDistance() > 0) { - Location currentLoc = helper.getApplication().getLocationProvider().getLastKnownLocation(); - final Location from = routeGeometry.locations.get(currentRoute - 1); - final Location to = routeGeometry.locations.get(currentRoute); +// Location currentLoc = helper.getApplication().getLocationProvider().getLastKnownLocation(); +// final Location from = routeGeometry.locations.get(currentRoute - 1); +// final Location to = routeGeometry.locations.get(currentRoute); // final LatLon projection = MapUtils.getProjection(currentLoc.getLatitude(), // currentLoc.getLongitude(), from.getLatitude(), from.getLongitude(), // to.getLatitude(), to.getLongitude()); From 29b03fd0eab4a822627c4dd6a454ede82f8aba29 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 14 Feb 2020 18:07:27 +0100 Subject: [PATCH 016/120] Fix settigns for straight to --- .../src/net/osmand/plus/routing/RoutingHelper.java | 4 ++-- .../plus/settings/RouteParametersFragment.java | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 8d5a6a2178..33d114a333 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -413,8 +413,8 @@ public class RoutingHelper { if (mc == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS || mc == OsmandSettings.MetricsConstants.MILES_AND_METERS) { return 500.f; } else { - // 1500 ft - return 457.2f; + // 1/4 mile + return 482.f; } } return posTolerance * ALLOWED_DEVIATION; diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 111ae75948..e2281a557c 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -140,12 +140,12 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP ApplicationMode am = getSelectedAppMode(); - float posTolerance = (float) RoutingHelper.getDefaultAllowedDeviation(settings, RoutingHelper.getPosTolerance(0)); + float defaultAllowedDeviation = RoutingHelper.getDefaultAllowedDeviation(settings, RoutingHelper.getPosTolerance(0)); if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); - setupSelectRouteRecalcDistance(screen, posTolerance); + setupSelectRouteRecalcDistance(screen, defaultAllowedDeviation); } else { - setupSelectRouteRecalcDistance(screen, posTolerance); + setupSelectRouteRecalcDistance(screen, defaultAllowedDeviation); GeneralRouter router = getRouter(getMyApplication().getRoutingConfig(), am); clearParameters(); if (router != null) { @@ -234,7 +234,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP } } - private void setupSelectRouteRecalcDistance(PreferenceScreen screen, float posTolerance) { + private void setupSelectRouteRecalcDistance(PreferenceScreen screen, float defaultAllowedDeviation) { Float[] entryValues; OsmandSettings settings = app.getSettings(); OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.get(); @@ -246,18 +246,16 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP String[] entries = new String[entryValues.length]; entries[0] = getString(R.string.no_recalculation_setting); - String defaultDistance = OsmAndFormatter.getFormattedDistance(settings.ROUTE_RECALCULATION_DISTANCE.getProfileDefaultValue(settings.getApplicationMode()), - app, false); + String defaultDistance = defaultAllowedDeviation < 0 ? getString(R.string.no_recalculation_setting) : + OsmAndFormatter.getFormattedDistance(defaultAllowedDeviation , app, false); entries[1] = String.format(getString(R.string.shared_string_app_default_w_val), defaultDistance); for (int i = 2; i < entryValues.length; i++) { entries[i] = OsmAndFormatter.getFormattedDistance(entryValues[i], app, false); } - ListPreferenceEx routeRecalculationDist = createListPreferenceEx(settings.ROUTE_RECALCULATION_DISTANCE.getId(), entries, entryValues, R.string.route_recalculation_dist_title, R.layout.preference_with_descr); - routeRecalculationDist.setEntries(entries); routeRecalculationDist.setEntryValues(entryValues); routeRecalculationDist.setDescription(getString(R.string.route_recalculation_dist_descr)); From dff8dfa82c06ec40dc7587db7bf74cfb43129074 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 14 Feb 2020 18:10:45 +0100 Subject: [PATCH 017/120] Fix setting --- OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java | 7 ++----- .../net/osmand/plus/settings/RouteParametersFragment.java | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 33d114a333..3224983990 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -400,13 +400,10 @@ public class RoutingHelper { } - public static float getDefaultAllowedDeviation(OsmandSettings settings, float posTolerance) { - ApplicationMode mode = settings.getApplicationMode(); - + public static float getDefaultAllowedDeviation(OsmandSettings settings, ApplicationMode mode, float posTolerance) { if (settings.DISABLE_OFFROUTE_RECALC.getModeValue(mode)) { return -1.0f; } else if (mode.getRouteService() == RouteService.DIRECT_TO) { - settings.DISABLE_OFFROUTE_RECALC.setModeValue(mode, true); return -1.0f; } else if (mode.getRouteService() == RouteService.STRAIGHT) { OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.getModeValue(mode); @@ -462,7 +459,7 @@ public class RoutingHelper { int currentRoute = route.currentRoute; double allowableDeviation = route.getRouteRecalcDistance(); if (allowableDeviation == 0) { - allowableDeviation = getDefaultAllowedDeviation(settings, posTolerance); + allowableDeviation = getDefaultAllowedDeviation(settings, route.getAppMode(), posTolerance); } // 2. Analyze if we need to recalculate route // >100m off current route (sideways) or parameter (for Straight line) diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index e2281a557c..de65830b16 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -140,7 +140,8 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP ApplicationMode am = getSelectedAppMode(); - float defaultAllowedDeviation = RoutingHelper.getDefaultAllowedDeviation(settings, RoutingHelper.getPosTolerance(0)); + float defaultAllowedDeviation = RoutingHelper.getDefaultAllowedDeviation(settings, am, + RoutingHelper.getPosTolerance(0)); if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); setupSelectRouteRecalcDistance(screen, defaultAllowedDeviation); From 5ef358001a25968eea4cbeb66da01e008b4cc2da Mon Sep 17 00:00:00 2001 From: max-klaus Date: Sat, 15 Feb 2020 12:49:52 +0300 Subject: [PATCH 018/120] Fix #8365 --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index f24a47851a..b5e07bc9a4 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -259,9 +259,11 @@ public class RouteProvider { // first of all check tracks if (!useIntermediatePointsRTE) { for (Track tr : file.tracks) { - for (TrkSegment tkSeg : tr.segments) { - for (WptPt pt : tkSeg.points) { - points.add(createLocation(pt)); + if (!tr.generalTrack) { + for (TrkSegment tkSeg : tr.segments) { + for (WptPt pt : tkSeg.points) { + points.add(createLocation(pt)); + } } } } From a10fdcfb3597a0a5a3e7a2d8d08f3d5693618464 Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Fri, 14 Feb 2020 08:36:23 +0000 Subject: [PATCH 019/120] Translated using Weblate (Japanese) Currently translated at 99.2% (3159 of 3184 strings) --- OsmAnd/res/values-ja/strings.xml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 7996a6fa44..40e32e77c1 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -3500,4 +3500,46 @@ POIの更新は利用できません 記録データの消去 座標をコピー 直接指示 + %2$d中の%1$d + レート + • プロファイル:表示順序、マップ画面で表示されるアイコン、ベースプロファイルすべての設定などを変更したり、初期状態に戻すことが可能に +\n +\n• ナビゲーションに出口番号を追加(※訳注 ジャンクションや高速道路の進路や出口を示す番号) +\n +\n• プラグイン設定の修正 +\n +\n• すべてのプロファイルにすばやくアクセスするために設定画面のUIを変更 +\n +\n• 別のプロファイルから設定をコピーするオプションの追加 +\n +\n• 検索にて順序を変更したりPOIカテゴリを非表示にする機能の追加 +\n +\n• マップ上に表示されるPOIアイコンの修正 +\n +\n• マップ設定に日出/日没データの追加 +\n +\n• マップに自宅/勤務先アイコンの追加 +\n +\n• 各設定に数行の機能説明を追加 +\n +\n• 日本地図に正しい音訳を追加 +\n +\n• 南極大陸マップを追加 +\n +\n + カテゴリーで並び替え + プロファイルの名前を入力 + 設定を開く + プラグインが無効 + このプラグインは別個のアプリケーションで、使用する予定がなくなった場合は、個別に削除する必要があります。 +\n +\n故にOsmAndをアンインストールしても、プラグインは削除されずに端末に残ります。 + メニュー + %1$s — %2$s — %3$s + ルート検索 + 描写スタイル + 追加データを内包 + インポートされたプロファイルには追加データが含まれています。 [インポート]をタップしてプロファイルデータのみをインポートするか、インポートする追加データを選択してください。 + プロファイルとともにエクスポートする追加データを選択できます。 + 南極大陸 \ No newline at end of file From a396d2092e84e3faa92093ed8dc294ec3e006a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1ns?= Date: Sat, 15 Feb 2020 13:25:32 +0000 Subject: [PATCH 020/120] Translated using Weblate (Galician) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-gl/strings.xml | 66 ++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index ee1678c02b..a9222498ba 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -323,7 +323,7 @@ Punto Nome do ficheiro GPX O ficheiro GPX foi gardado en {0} - Este engadido fornece un trebello no mapa, permitindo crear camiños premenso no mapa, empregando ou modificando ficheiros GPX existentes, para planificar unha viaxe e medir a distancia entre puntos. Os resultados poden gardarse coma un ficheiro GPX e empregarse despois para a orientación. + Crea camiños premendo no mapa, empregando ou modificando ficheiros GPX existentes, para planificar unha viaxe e medir a distancia entre puntos. Os resultados poden gardarse coma un ficheiro GPX e empregarse despois para a orientación. Calculadora de distancias e ferramenta de planificación * Prema para marcar un punto. \n * Manteña premido o mapa para riscar-lo punto anterior. @@ -696,11 +696,11 @@ \n \nBaixa as teselas dos mapas directamente en liña, ou prepárao para o seu emprego sen conexión (copiar de xeito manual no cartagol de datos OsmAnd) coma unha base de datos SQLite que pode ser producida por unha variedade de ferramentas de preparación de mapas de terceiros. Activa as funcións de accesibilidade do dispositivo de xeito directo no OsmAnd. Fai máis doado por exemplo, o axuste da velocidade da voz para sintetizadores de voz, os axustes de navegación D-pad, empregando a roda de desprazamento para o control do achegamento (zoom), ou a retroalimentación de texto a voz, por exemplo, para anunciar a túa posición de xeito automático. - Este engadido amosa os axustes de funcións de desenvolvemento e depuración para probar a simulación de rutas, o rendimiento do renderizado, ou as indicacióbs por voz. Estes axustes están destinados para os desenvolvedores e non son necesarios para o usuario xeral. + Axusta as funcións de desenvolvemento e depuración, como a simulación de navegación, o rendemento do renderizado ou as indicacións por voz. Destinado para desenvolvedores, non é necesario para o normal uso da aplicación. Engadidos Os engadidos activan opcións avanzadas e funcionalidades adicionais. Engadidos - Con este engadido pódese emprega-lo OsmAnd para achegar melloras ó OSM, coma crear ou modificar obxectos de punto de interese do OSM, abrir ou comentar fallos do OSM e enviar ficheiros GPX gravados. OSM é un proxecto comunitario de creación de mapas globais no dominio público. Para máis detalles, olle https://openstreetmap.org. Agradécese a participación activa e as contribucións pódense realizar directamente dende o OsmAnd se se indican as credenciais persoais do OSM na aplicación. + Fai contribucións no OSM, como o crear ou modificar obxectos PDI, abrir ou comentar notas do OSM e contribuír con ficheiros de pistas GPX gravados no OsmAnd, fornecendo o teu nome de usuario e contrasinal. O OpenStreetMap.org é un proxecto de cartografado de dominio público, global, ceibe e impulsado pola comunidade. Os mapas vectoriais seguramente amósanse máis axiña. Poden non funcionar ben nalgúns dispositivos. Escolle unha voz e reproduce probas dos avisos: Desenvolvemento do OsmAnd @@ -3530,4 +3530,64 @@ Lon %2$s Empregar aplicación do sistema Son do obturador da cámara A autorización foi correcta + Reorganizar categorías + Podes engadir categorías personalizadas, agochar as categorías que non semellen necesarias e mudar a orde de clasificación da listaxe. A listaxe pode ser importada e exportada con perfís. + Podes engadir unha nova categoría personalizada marcando unha ou varias categorías necesarias. + Restabelecer ó valor por defecto, restabelecerá a orde de clasificación ó estado por defecto após a instalación. + Dispoñíbel + Engadir categoría personalizada + Amosar só á noite + Todos os axustes do engadido restabelecéronse ó estado por defecto. + Todos os axustes do perfil restabelecéronse ó estado por defecto. + %1$s/%2$s + Solpor ás %1$s + Amencer ás %1$s + Modo de accesibilidade desactivado no teu sistema. + Empregar o tempo de espera da pantalla do sistema + Desactivado de xeito predefinido, se o OsmAnd é executado en primeiro plano, a pantalla manterase acendida. +\n +\nSe se activa, o OsmAnd empregará os axustes de tempo de espera do sistema. + Limpar datos gravados + • Perfís: agora podes mudar a orde, definir a icona para o mapa, mudar todos os axustes para os perfís base e restabelecelos de novo ó valores por defecto +\n +\n • Engadíronse os números de saída na navegación +\n +\n • Redeseñáronse os axustes dos engadidos +\n +\n • Redeseñouse a lapela de axustes, para un acceso rápido a todos os perfís +\n +\n • Engadiuse a opción de copiar os axustes doutro perfil +\n +\n • Engadiuse a posibilidade de mudar a orde ou agochar as categorías de PDI na procura +\n +\n • Aliñáronse de xeito correcto no mapa as iconas de PDI +\n +\n • Engadíronse datos do amencer e solpor en \"Configurar o mapa\" +\n +\n • Engadíronse iconas de \"Casa\" e \"Traballo\" no mapa +\n +\n • Engadiuse soporte para as múltiples liñas de descrición nos Axustes +\n +\n • Engadiuse a correcta transliteración no mapa do Xapón +\n +\n • Engadiuse o mapa da Antártida +\n +\n + Copiar coordenadas + Directo ó punto + Ordenar por categoría + Fornece un nome para o perfil + Abrir os axustes + Engadido desactivado + Este engadido é unha aplicación independente, terás que eliminalo por separado se non pensas seguir empregándoo. +\n +\nO engadido ficará no dispositivo após desinstalar o OsmAnd. + Menú + %1$s — %2$s — %3$s + Enrutamento + Estilo de renderización personalizado + Incluír datos adicionais + O perfil importado contén datos adicionais. Preme en \"Importar\" para importar só datos de perfil ou marca datos adicionais para importar. + Podes marcar datos adicionais para exportar ó carón do perfil. + Antártida \ No newline at end of file From 1b6fa0d2f7465642e3bbd62cfadd2343ee8034b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Fri, 14 Feb 2020 10:40:48 +0000 Subject: [PATCH 021/120] Translated using Weblate (Turkish) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-tr/strings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 1e934fdaac..3ddd51edcd 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -3481,4 +3481,18 @@ Koordinatları kopyala Doğrudan noktaya Kategoriye göre sırala + Lütfen profil için bir ad girin + Ayarları aç + Eklenti devre dışı + Bu eklenti ayrı bir uygulamadır, artık kullanmayı düşünmüyorsanız ayrı olarak kaldırmanız gerekecektir. +\n +\nEklenti, OsmAnd kaldırıldıktan sonra cihazda kalacaktır. + Menü + %1$s — %2$s — %3$s + Yönlendirme + Özel görselleştirme stili + İlave veriler ekle + İçe aktarılan profil ilave veriler içermektedir. Yalnızca profil verilerini içe aktarmak için İçe Aktar\'ı tıklayın veya içe aktarılacak ilave verileri seçin. + Profil ile birlikte dışa aktarılacak ilave veriler seçebilirsiniz. + Antarktika \ No newline at end of file From c8be347cce98fbb9f91c41507bde4f0f1bec92b9 Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Sat, 15 Feb 2020 01:47:48 +0000 Subject: [PATCH 022/120] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-pt-rBR/strings.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index 7a954236b0..8cc94ffa4e 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -888,7 +888,7 @@ Pôr do Sol: %2$s Mantenha à esquerda e siga Mantenha à direita e siga Tornar transparente todas as características de terra no mapa. - Polígonos de áreas + Polígonos Modo de renderização Otimizar o mapa para Exibir a partir do nível de zoom (requer dados de contorno): @@ -3512,4 +3512,19 @@ Pôr do Sol: %2$s \n Copiar coordenadas Direto ao ponto + Classificar por categoria + Forneça um nome para o perfil + Abrir configurações + Plugin desativado + Este plugin é um aplicativo separado, você precisará removê-lo separadamente se não planeja mais usá-lo. +\n +\nO plug-in permanecerá no dispositivo após a remoção do OsmAnd. + Menu + %1$s — %2$s — %3$s + Roteamento + Estilo de renderização personalizado + Incluir dados adicionais + O perfil importado contém dados adicionais. Clique em Importar para importar apenas dados do perfil ou selecione dados adicionais a serem importados. + Você pode selecionar dados adicionais para exportar junto com o perfil. + Antártida \ No newline at end of file From d4df4fd6b97f46875c4ffae7f67eb60f6a7a3596 Mon Sep 17 00:00:00 2001 From: Mr-Update Date: Fri, 14 Feb 2020 16:45:07 +0000 Subject: [PATCH 023/120] Translated using Weblate (German) Currently translated at 99.8% (3177 of 3184 strings) --- OsmAnd/res/values-de/strings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 48d21a3bbd..c856e66b7d 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -3525,4 +3525,18 @@ Lon %2$s \n Nach Kategorie sortieren Ihre aufgezeichneten Tracks befinden sich in %1$s oder im OsmAnd-Ordner. + Bitte geben Sie einen Namen für das Profil an + Einstellungen öffnen + Plugin deaktiviert + Dieses Plugin ist eine separate Anwendung, Sie müssen es separat entfernen, wenn Sie nicht mehr vorhaben, es zu verwenden. +\n +\nDas Plugin verbleibt nach dem Entfernen von OsmAnd auf dem Gerät. + Menü + %1$s — %2$s — %3$s + Routing + Benutzerdefinierter Rendering-Stil + Zusätzliche Daten einschließen + Das importierte Profil enthält zusätzliche Daten. Klicken Sie auf \'Importieren\', um nur Profildaten zu importieren, oder wählen Sie zusätzliche Daten zum Importieren aus. + Sie können zusätzliche Daten zum Exportieren zusammen mit dem Profil auswählen. + Antarktis \ No newline at end of file From 45887d1b6d21568798664ac9393e29716ccfaf1b Mon Sep 17 00:00:00 2001 From: jan madsen Date: Fri, 14 Feb 2020 18:05:35 +0000 Subject: [PATCH 024/120] Translated using Weblate (Danish) Currently translated at 89.2% (2841 of 3184 strings) --- OsmAnd/res/values-da/strings.xml | 45 +++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 3bcb065b12..36c7120fff 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -1076,14 +1076,14 @@ Proportional hukommelse %4$s MB (Android grænse %5$s MB, Dalvik %6$s MB). Foretræk motorveje Foretræk motorveje - Undgå betalingsveje - Undgå betalingsveje - Undgå grusveje - Undgå grusveje. - Undgå færger - Undgå færger - Undgå motorveje - Undgå motorveje + Ingen betalingsveje + Undgår betalingsveje + Ingen ikke-asfalterede veje + Undgår ikke asfalterede veje + Ingen færger + Undgår færger + Ingen motorveje + Undgår motorveje Vægtgrænse Angiv tilladt vægtgrænsen for køretøj på ruter. Ruteinfo @@ -1555,7 +1555,7 @@ Proportional hukommelse %4$s MB (Android grænse %5$s MB, Dalvik %6$s MB).Kopier Flyt datafilerne til den nye placering\? Husnumre - Undgå at krydse landegrænser + Undgår at krydse nationale grænser Højdegrænse Angiv køretøjets højde der tillades på ruter. Smart rutegenberegning @@ -1806,9 +1806,9 @@ Proportional hukommelse %4$s MB (Android grænse %5$s MB, Dalvik %6$s MB).Menuknappen viser betjeningspanelet, i stedet for menuen Adgang fra kort Angiv den korrekte IP-type eller spring over. - Undgå trapper - Undgå trapper - Undgå grænseovergange + Ingen trapper + Undgår trapper + Ingen grænseovergange Skjul Laveste kvalitet Højeste kvalitet @@ -3363,7 +3363,7 @@ Repræsenterer område: %1$s x %2$s Anvend ændringer på alle profiler eller kun på den aktuelt valgte. Delt Foretræk ikke-asfalterede veje - Foretræk ikke-asfalterede veje. + Foretræk ikke-asfalterede veje fremfor asfalterede veje. OSM redigeringer En til/fra-knap for at vise eller skjuler højdekurver på kortet. Vis højdekurver @@ -3481,4 +3481,23 @@ Repræsenterer område: %1$s x %2$s %1$s/%2$s Solnedgang kl. %1$s Solopgang kl. %1$s + Nulstilling til standard nulstiller sorteringsrækkefølgen til standardtilstanden efter installationen. + Tilgængelighedstilstand deaktiveret i systemet. + Brug systemskærm timeout + Ryd optagede data + Kopier koordinater + Direkte-til-punkt + Sorter efter kategori + Angiv et navn til profilen + Åbn indstillinger + Udvidelse deaktiveret + Udvidelsen er et separat program, ska fjernes separat, hvis det ikke længere bruges. +\n +\nUdvidelsen vil forblive på enheden efter fjernelse OsmAnd. + Menu + %1$s — %2$s — %3$s + Ruteplanlægning + Medtag yderligere data + Vælg yderligere data, der skal eksporteres sammen med profilen. + Antarktis \ No newline at end of file From f701419779a2f62d0ae58db3c42bb7f013ab52e7 Mon Sep 17 00:00:00 2001 From: Verdulo Date: Sat, 15 Feb 2020 01:52:08 +0000 Subject: [PATCH 025/120] Translated using Weblate (Esperanto) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-eo/strings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml index 8c8493a244..fb14ce2aa1 100644 --- a/OsmAnd/res/values-eo/strings.xml +++ b/OsmAnd/res/values-eo/strings.xml @@ -3507,4 +3507,18 @@ Indikas lokon: %1$s x %2$s" Kopii koordinatojn Rekte al punkto Ordigi laŭ kategorio + Bonvolu enigi nomon por la profilo + Malfermi agordojn + Kromprogramo malaktiva + Tiu ĉi kromprogramo estas aparta aplikaĵo, vi devos malinstali ĝin se vi ne plu volas uzi ĝin. +\n +\nLa kromprogramo restos en via aparato eĉ post malinstali OsmAnd. + Menuo + %1$s — %2$s — %3$s + Kurs‑difinado + Propra stilo de bildigado + Ampleksi kromajn datumojn + La enportata profilo enhavas kromajn datumojn. Frapetu “enporti” por enporti nur profilajn datumojn aŭ elektu kromajn datumojn por enporti. + Vi povas elekti kromajn datumojn por elporti kune kun la profilo. + Antarkto \ No newline at end of file From ac43839021a77b4ad49b9900a1e9a75184f161fd Mon Sep 17 00:00:00 2001 From: Tymofij Lytvynenko Date: Fri, 14 Feb 2020 10:23:56 +0000 Subject: [PATCH 026/120] Translated using Weblate (Ukrainian) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-uk/strings.xml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 8e49aa3f9c..9cde309317 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -37,7 +37,7 @@ Використовувати мережеві мапи (завантажити та кешувати плитки на карті пам\'яті). Мережеві мапи Оберіть мережеві або кешовані джерела (тайлів) мап. - Цей втулок надає можливість отримати доступ до багатьох видів мережевих (так званих растрових) мап які ви хочете, від попередньо створених квадратів OpenStreetMap (на зразок стилю Mapnik) до супутникових знімків та особливих шарів, як-от погодні, кліматичні та землезнавчі мапи, шари рельєфу й т.і. + Цей втулок надає можливість отримати доступ до багатьох видів мережевих (так званих растрових) мап які ви хочете, від попередньо створених квадратів OpenStreetMap (на зразок стилю Mapnik) до супутникових знімків та особливих шарів, як-от погодні, кліматичні та землезнавчі мапи, шари рельєфу тощо. \n \n \nБудь яка з цих мап може використовуватись як основна мапа в OsmAnd, або як покриття чи підкладка до іншої основної мапи (наприклад усталена безмережева мапа OsmAnd). Для того, щоб зробити більш помітною будь-яку мапу-підкладку, певні елементи векторної мапи OsmAnd можна легко сховати через меню „Налаштування мапи“ за бажанням, щоб зробити будь-яку мапу підкладки помітнішою.. @@ -1638,7 +1638,7 @@ Відкрити OSM-нотатку Відкрити заново OSM-нотатку До OSM-примітки додано коментар - Вилучено OSM-нотатку + Вилучено OSM-примітку Створено OSM-нотатку OSM-нотатка Створити нотатку @@ -1866,15 +1866,15 @@ Відзвітувати Показувати гірськовелосипедні маршрути \"Вимкнено\" запускає мапу безпосередньо. - Додати усі точки як позначки мапи? + Додати всі точки як позначки мапи\? Додати до позначок мапи - Обрати позначки мапи + Оберіть позначки Зворотній порядок Показати елементи з позначок мапи. Вилучити усі задіяні позначки\? Очистити дієпис позначок мапи\? Поточні позназчки - Позначки мапи + Позначки Позначка мапи Рекомендується вимкнути промальовку полігонів. GPX-файл з координатами. @@ -2572,7 +2572,7 @@ Імпортувати файл Дотик на мапі змінює кнопки управління та віджети. Повноекранний режим - Позначати пройдене + Позначити пройденим Кількість десяткових цифр Показати цифрову панель Вставити @@ -3516,4 +3516,18 @@ Скопіювати координати Пряма точка Впорядкувати за категоріями + Укажіть назву профілю + Відкрити налаштування + Втулок вимкнено + Цей втулок - окремий застосунок, його потрібно буде видалити окремо, якщо ви більше не плануєте ним користуватися. +\n +\nВтулок залишиться на пристрої після видалення OsmAnd. + Меню + %1$s — %2$s — %3$s + Маршрутизація + Власний стиль відмальовування + Включати додаткові дані + Імпортований профіль містить додаткові дані. Натисніть кнопку імпортувати, щоб імпортувати лише дані профілю або вибрати додаткові дані для імпорту. + Ви можете вибрати додаткові дані для експорту разом із профілем. + Антарктида \ No newline at end of file From 1ae68c2dc350fa99154e96d433591cd1aa8334d9 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Fri, 14 Feb 2020 04:49:25 +0000 Subject: [PATCH 027/120] Translated using Weblate (Hebrew) Currently translated at 94.2% (2999 of 3184 strings) --- OsmAnd/res/values-he/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml index 7bf23e239b..6c2ccb9d10 100644 --- a/OsmAnd/res/values-he/strings.xml +++ b/OsmAnd/res/values-he/strings.xml @@ -3450,4 +3450,7 @@ שקיעה ב־%1$s זריחה ב־%1$s מצב נגישות מושבת במערכת שלך. + נא לבחור שם לפרופיל + פתיחת ההגדרות + התוסף מושבת \ No newline at end of file From 2cdc1016d741523073d92cea7b656dca00d34b11 Mon Sep 17 00:00:00 2001 From: WaldiS Date: Fri, 14 Feb 2020 21:13:17 +0000 Subject: [PATCH 028/120] Translated using Weblate (Polish) Currently translated at 95.6% (3045 of 3184 strings) --- OsmAnd/res/values-pl/strings.xml | 52 ++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml index 8cef0745f4..7e1317eeb4 100644 --- a/OsmAnd/res/values-pl/strings.xml +++ b/OsmAnd/res/values-pl/strings.xml @@ -3421,7 +3421,7 @@ Reprezentuje obszar: %1$s x %2$s Wybierz ikonę, kolor i nazwę Edytuj listę profili Wybierz profil - Kliknięcie %1$s spowoduje utratę wszystkich zmian. + Stuknięcie %1$s spowoduje utratę wszystkich zmian. Wszystkie ustawienia profilu zostaną przywrócone do stanu po instalacji. Czy zresetować wszystkie ustawienia profilu do wartości domyślnych\? %1$s: %2$s @@ -3444,7 +3444,7 @@ Reprezentuje obszar: %1$s x %2$s Te ustawienia mają zastosowanie do wszystkich profilów. Edycja OSM OSM - Ikona wyświetlana tylko podczas nawigacji lub ruchu. + Ikona wyświetlana podczas nawigacji lub ruchu. Ikona mapy wyświetlana tylko na mapie. Sprawdź i udostępnij szczegółowe dzienniki aplikacji Brak reguł wyznaczania trasy w \'%1$s\'. Wybierz inny plik. @@ -3469,4 +3469,52 @@ Reprezentuje obszar: %1$s x %2$s %1$s/%2$s Zachód słońca o %1$s Wschód słońca o %1$s + Adres internetowy + Prędkość minimalna + Minimalna dokładność + Minimalne przemieszczenie + Przywrócenie ustawień wtyczki do wartości domyślnych + Użyj aplikacji systemowej + Dźwięk migawki aparatu + Przywrócenie domyślnej kolejności sortowania spowoduje przywrócenie porządku sortowania do stanu domyślnego po instalacji. + Tryb ułatwień dostępu wyłączony w twoim systemie. + Użyj czasu wyświetlania ekranu systemowego + Wyczyść zarejestrowane dane + - Profile: teraz można zmienić kolejność, ustawić ikonę dla mapy, zmienić wszystkie ustawienia dla profili bazowych i przywrócić je do domyślnych ustawień. +\n +\n - Dodany numer wyjścia w nawigacji +\n +\n - Poprawione ustawienia wtyczek +\n +\n - Poprawiony ekran ustawień dla szybkiego dostępu do wszystkich profili +\n +\n - Dodano opcję kopiowania ustawień z innego profilu +\n +\n - Dodano możliwość zmiany zamówienia lub ukrycia kategorii POI w Wyszukiwaniu +\n +\n - Prawidłowo wyrównane ikony POI na mapie +\n +\n - Dodano dane o zachodzie/wschodzie słońca do Konfiguruj mapę +\n +\n - Dodane ikony domu/pracy na mapie +\n +\n - Dodano obsługę opisu wielu linii w Ustawieniach +\n +\n - Dodano prawidłową transliterację do mapy Japonii +\n +\n - Dodana mapa Antarktydy +\n +\n + Kopiuj współrzędne + Podaj nazwę dla profilu + Otwórz ustawienia + Wtyczka wyłączona + Ta wtyczka jest osobną aplikacją, musisz ją usunąć osobno, jeśli nie planujesz już jej używać. +\n +\nWtyczka pozostanie na urządzeniu po usunięciu OsmAnd. + %1$s — %2$s — %3$s + Własny styl wyświetlania + Uwzględnij dodatkowe dane + Zaimportowany profil zawiera dodatkowe dane. Kliknij przycisk Importuj, aby zaimportować tylko dane profilu lub wybierz dodatkowe dane do zaimportowania. + Możesz wybrać dodatkowe dane do wyeksportowania wraz z profilem. \ No newline at end of file From a71ceed1cc4a2e5e4c87314d07965982a86e9ff9 Mon Sep 17 00:00:00 2001 From: Softmap Date: Fri, 14 Feb 2020 22:42:36 +0000 Subject: [PATCH 029/120] Translated using Weblate (Arabic) Currently translated at 99.8% (3180 of 3184 strings) --- OsmAnd/res/values-ar/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index e75ac0dbbb..def6d059fb 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -3430,4 +3430,12 @@ نسخ الإحداثيات مباشر إلى نقطة الفرز حسب الفئة + يرجى اعطاء اسم للملف الشخصي + افتح الإعدادات + البرنامج المساعد معطل + القائمة + التوجيه + تضمين بيانات إضافية + يمكنك تحديد بيانات إضافية للتصدير مع الملف الشخصي. + القارة القطبية الجنوبية \ No newline at end of file From 2073d10cfc029a1bf7d4fdb6f184d7c8319ab9f8 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Fri, 14 Feb 2020 06:30:54 +0000 Subject: [PATCH 030/120] Translated using Weblate (French) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-fr/strings.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index da20c6c7a0..89876f271f 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -1109,7 +1109,7 @@ Éviter les voies non revêtues Éviter les voies non revêtues Éviter les ferries - Éviter les ferries + Éviter les traversées en ferries Éviter les autoroutes Éviter les autoroutes Limite de poids @@ -3175,7 +3175,7 @@ représentant la zone : %1$s x %2$s Relier les trous Campeur Camping-car - Afficher les zones à faible émission sur la carte (n\'influe pas sur l\'itinéraire). + Afficher les zones à faible émission sur la carte (n\'influe pas sur le calcul d\'itinéraire). Afficher les zones à faibles émissions Itinéraire : distance %s, durée %s \nCalculs : %.1f secondes, %d routes, %d tuiles) @@ -3496,4 +3496,18 @@ représentant la zone : %1$s x %2$s Copier les coordonnées Le plus direct Trier par catégorie + Veuillez saisir un nom de profil + Ouvrir les paramètres + Greffon désactivé + Ce greffon est une application indépendante, vous devrez la désinstaller séparément si vous ne souhaitez plus l\'utiliser. +\n +\nLe greffon sera toujours présent sur l\'appareil après avoir désinstallé OsmAnd. + Menu + %1$s — %2$s — %3$s + Calcul d\'itinéraire + Style de rendu personnalisé + Inclure des données supplémentaires + Le profil importé contient des données supplémentaires. Cliquez sur Importer pour n\'importer que les données de profil ou sélectionnez des données supplémentaires à importer. + Vous pouvez sélectionner des données supplémentaires à exporter en même temps que le profil. + Antarctique \ No newline at end of file From aea92bee7eebe6664e4f9415ffdb87251d984ce2 Mon Sep 17 00:00:00 2001 From: iman Date: Fri, 14 Feb 2020 08:15:54 +0000 Subject: [PATCH 031/120] Translated using Weblate (Persian) Currently translated at 99.8% (3177 of 3184 strings) --- OsmAnd/res/values-fa/strings.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index 52f8c2cefc..f4f3ffaece 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -560,7 +560,7 @@ در حال استخراج فایل… شبکه ثانیه - min. + دقیقه جزئیات مسیر اصلاح POI حذف POI @@ -2037,7 +2037,7 @@ ویکی‌پدیا از حدف این %1$d یادداشت مطمئن هستید؟ س - min + دقیقه مخفی شود ظاهر جاده کدِ مکانی باز (OLC) @@ -2396,7 +2396,7 @@ ایجاد یادداشت OSM یادداشت OSM بازگشوده ایجاد یادداشت OSM - عارضه‌های پیشنهادی (Proposed) + طرح‌های آینده (Proposed) ایجاد POI واردشده با عنوان %1$s مدت حرکت @@ -3551,4 +3551,19 @@ کپی مختصات مستقیم تا نقطه ترتیب بر اساس دسته + قابل‌استفاده + لطفاً یک نام برای پروفایل بنویسید + بازکردن تنظیمات + افزونه غیرفعال شد + این افزونه یک برنامهٔ جداگانه است. اگر دیگر لازمش نداشتید باید جداگانه آن را حذف کنید. +\n +\nبا حذف OsmAnd، این افزونه روی دستگاه باقی می‌ماند. + منو + %1$s — %2$s — %3$s + مسیریابی + سبک رندر سفارشی + شامل دادهٔ بیشتر + پروفایلِ درون‌بردی حاوی دادهٔ بیشتری است. «درون‌برد» را بزنید تا فقط دادهٔ پروفایل درون‌برد شود. «دادهٔ بیشتر» را انتخاب کنید تا آن را نیز درون‌برد کنید. + می‌توانید دادهٔ بیشتری را انتخاب کنید تا همراه با پروفایل برون‌برد کنید. + جنوبگان \ No newline at end of file From edbfa5ab4f00a346c321ca226e6a64d7bd625aee Mon Sep 17 00:00:00 2001 From: Branko Kokanovic Date: Sat, 15 Feb 2020 00:31:05 +0000 Subject: [PATCH 032/120] Translated using Weblate (Serbian) Currently translated at 98.0% (3121 of 3184 strings) --- OsmAnd/res/values-sr/strings.xml | 65 +++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 17 deletions(-) diff --git a/OsmAnd/res/values-sr/strings.xml b/OsmAnd/res/values-sr/strings.xml index cd92a20648..1f775d57ed 100644 --- a/OsmAnd/res/values-sr/strings.xml +++ b/OsmAnd/res/values-sr/strings.xml @@ -171,7 +171,7 @@ Поравнавање карте: Детаљи руте Куцај да претражујеш тачке од интереса - Дневник ОСМ-а (на мрежи) + ОСМ белешке (на мрежи) Слој са тачкама од интереса… Претрага тачака од интереса Где сам ја? @@ -598,7 +598,7 @@ \nВреме и положај су видљиви на командној табли OsmAnd-а, или као справица на карти. Може се додати аларм као подсетник на Андроид календару. Овај додатак додаје справицу на карти која омогућава стварање путањи тапкањем на карту, или употребу и измену постојећих GPX фајлова, ради зацртавања путовања и мерења растојања између тачака. Добијени излази се могу сачувати као GPX фајлови које се касније могу користити као водичи. Приступачност - Уређивање ОСМ-а + OpenStreetMap уређивање Развој OsmAnd-а претходни дани Места за паркирање @@ -1096,7 +1096,7 @@ Изаберите улицу Изаберите град или поштански број Изаберите државу - Изаберите извор мрежних или захваћених плочица карата + Изаберите извор мрежних или захваћених плочица карата. Изаберите тачке од интереса Одаберите област са списка Одаберите улицу која је сече @@ -1384,9 +1384,9 @@ Активирана ознака %s. Тупните ознаку на карти ради њеног померања на врх активних ознака без отварања приручног изборника. Покретање на \'један туп\' - Хватајте белешке! + Правите белешке! Додај снимак, звучну или сликовну белешку на сваку тачку карте, помоћу справице или приручног изборника. - Белешке по данима + OSM белешке по данима По дану По врсти Претрага за путањама са пролазним тачкама @@ -1460,7 +1460,7 @@ Сакриј пређене Уклони из ’Ознака карти’ Додато - Изаберите како указати на растојање и правац ка ознакама карте на приказу карте: + Изаберите како указати на растојање и правац ка ознакама карте на карти: Испод изаберите којом брзином ће усмерење карте прећи из „у правцу кретања“ на „компас“. Све ознаке карте су премештене у историју Ознаке карте су премештене у историју @@ -1477,7 +1477,7 @@ Приказ удаљености Распореди по Без анимација - Искључивање анимација у апликацији. + Искључује анимације у апликацији. Приказуј на карти Изађи пре чувања? Линија @@ -1597,7 +1597,7 @@ \n • OsmAnd Live претплата сада укључује све OsmAnd функционалности \n GPX - погодно за извоз у ЈОСМ и друге ОСМ уређиваче. - ОСЦ - погодно за извоз у OpenStreetMap. + ОСЦ - погодно за извоз у OSM. ОСЦ фајл Одаберити тип извоза: ОСМ белешке, тачке од интереса или оба. Малајалам @@ -2494,8 +2494,8 @@ \nГлобални подаци (између 70° северно и 70° јужно) се базирани на SRTM (Shuttle Radar Topography Mission) и ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), инструментима за сликање на водећем НАСА-ином сателиту Terra. ASTER је заједнички напор НАСА-е, јапанског министарства економије, трговине и индустрије (METI), и јапанског свемирског система (J-spacesystems). Преко овог додатка можете користити OsmAnd да доприносите ОСМ-у, преко прављења и измена ОСМ објеката тачака од интереса, отварања или коментарисања ОСМ белешки, и прилагањем снимљених GPX фајлова. ОСМ је глобални пројекат мапирања света у јавном домену, вођен заједницом. За детаље погледајте https://openstreetmap.org. Активно учешће ће бити цењено, а доприноси могу бити рађени директно из OsmAnd-а, уколико поставите ОСМ акредитиве у апликацији. Главно бележење позиције у GPX фајл може да се укључи и искључи коришћењем справице за GPX бележење на карти. - Од Андроида 4.4 (KitKat), фасциклу за складиште (%s) је застарела. Копирај све OsmAnd фајлове на нови локацију за складиште\? -\n Белешка 1: Ваши стари фајлови неће вити дирани (али можете их Ви сами обрисати) + Од Андроида 4.4 (KitKat), фасциклу за складиште (%s) је застарела. Копирај све OsmAnd фајлове на нови локацију за складиште\? +\n Белешка 1: Ваши стари фајлови неће вити дирани (али можете их Ви сами обрисати). \n Белешка 2: У новој локацији за складиште, неће бити могуће делити фајлове између OsmAnd и OsmAnd+ апликација. Искључи двофазно усмеравање за навођење у колима. Извор сличице %1$s сачуван @@ -2601,7 +2601,7 @@ Употреба трекбола Нема тачака од интереса без интернета за ово подручје Ажурираћете тачке од интереса ако још зумирате - Фасцикла са складиштем података на меморијској картици није приступачна! + Фасцикла са складиштем на меморијској картици није приступачна! Отварам скуп промена… Затварам скуп промена… Предајем чвор… @@ -2627,7 +2627,8 @@ Читај Википедију ван мреже Преузми све Поново покрени апликацију - Укупно меморије које је алоцирала апликација %1$s MB (Далвик %2$s MB, остало %3$s MB). Пропорционално меморије %4$s MB (Андроид лимит %5$s MB, Далвик %6$s MB). + Укупно меморије које је алоцирала апликација %1$s MB (Далвик %2$s MB, остало %3$s MB). +\nПропорционално меморије %4$s MB (Андроид лимит %5$s MB, Далвик %6$s MB). Начини провидним све ваздушне одлике терена. Приказуј неке детаље векторских карти (путеви итд.) већ на мањим зумовима. Стари формат података карте \'\'{0}\'\' није подржан @@ -3055,7 +3056,7 @@ Кола, камион, мотор Планинарски бицикл, мопед, коњ Ходање, шетање, трчање - Сви типови јавног превоза + Типови јавног превоза Брод, веслање, једрење Авион, параглајдинг Геокодирање @@ -3262,7 +3263,7 @@ Остало Тежина, висина, брзина Параметри возика - Гласовна обавештења су само за време навођења. + Гласовна обавештења су дешавају само за време навођења. Инструкције и обавештења приликом навођења Гласовна обавештења Упозорења на екрану @@ -3282,8 +3283,8 @@ Уметни путању до фасцикле са OsmAnd подацима Промени OsmAnd фасциклу са подацима\? Премести на ново одредиште - Интерно складиште, скривено од корисника и других апликација, доступно једино OsmAnd-у - Промени фасциклу складишта података + Интерно складиште за OsmAnd (скривено од корисника и других апликација). + Промени фасциклу складишта Зимски парк Саонице Санке @@ -3334,7 +3335,7 @@ \n \n • Нови дијалог за преузимање карти који препоручује карте за преузимање док се разгледа карта \n -\n • Поправке за ноћну тему +\n • Поправке за тамну тему \n \n • Исправљено неколико грешака у навигацији свуда по свету \n @@ -3470,4 +3471,34 @@ Користи системску апликацију Звук шкољцања фотоапарата Провера идентитета успела + Преуреди категорије + Можете да додате нове произвољне категорије означавајући једну или више потребних категорија. + Ресетовање на подразумевано ће ресетовати редослед сортирања на подразумевано стање после инсталације. + Доступно + Додај произвољну категорију + Прикажи само ноћу + Све поставке додатка враћене на подразумевано стање. + Све поставке профила враћене на подразумевано стање. + %1$s/%2$s + Сунце залази у %1$s + Сунце излази у %1$s + Режим приступачности је искључен на Вашем систему. + Користи системско време одлагања гашења екрана + Подразумевано је искључено, ако OsmAnd ради у предњем плану, екран неће да се гаси. +\n +\nАко је укључено, OsmAnd ће користити системско време одлагања гашења екрана. + Очисти снимљене податке + Копирај координате + Дикретно-на-тачку + Сортирај по категорији + Унесите име профила + Отвори поставке + Додатак искључен + Мени + %1$s — %2$s — %3$s + Произвољни стил исцртавања + Укључи додатне податке + Увезени профил садржи додатне податке. Кликните на Увоз да увезете да увезете само профилне податке или одаберите које додатне податке увести. + Поред профила, можете одабрати додатне податке за извоз. + Антарктик \ No newline at end of file From a1cddeb1f1ccd803885c54045c20e56f422cc034 Mon Sep 17 00:00:00 2001 From: Franco Date: Fri, 14 Feb 2020 15:35:33 +0000 Subject: [PATCH 033/120] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index 667d893c5b..fb226b8244 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -3526,4 +3526,18 @@ Lon %2$s Copiar coordenadas Directo al punto Ordenar por categoría + Proporciona un nombre para el perfil + Abrir los ajustes + Complemento desactivado + Este complemento es una aplicación independiente, deberás quitarlo por separado si no piensas seguir usándolo. +\n +\nEl complemento permanecerá en el dispositivo después de desinstalar OsmAnd. + Menú + %1$s → %2$s → %3$s + Enrutamiento + Vista de estilo propia + Incluir datos adicionales + El perfil importado contiene datos adicionales. Pulsa en «Importar» para importar sólo datos de perfil o marca datos adicionales para importar. + Puedes marcar datos adicionales para exportar junto con el perfil. + Antártida \ No newline at end of file From 8cc4f5a06e68103fa91e8f69197fd720c2b858aa Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sat, 15 Feb 2020 02:17:50 +0000 Subject: [PATCH 034/120] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 510f0da878..2c867c8c6b 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -3516,4 +3516,18 @@ 複製座標 點對點 按分類排序 + 請為設定檔命名 + 開啟設定 + 外掛程式已停用 + 此外掛程式是獨立的應用程式,如果您不打算再使用它,請將其移除。 +\n +\n在您移除 OsmAnd 後,這類的外掛程式仍將繼續存在於裝置上。 + 選單 + %1$s — %2$s — %3$s + 路徑 + 自訂彩現樣式 + 包含額外資料 + 已匯入的設定檔包含了額外資料。點擊匯入僅匯入設定檔資料或選取額外的資料以匯入。 + 您可以選取額外的資料以與設定檔一起匯出。 + 南極洲 \ No newline at end of file From 6350301564f3042418e8f83b2c75b5722e03646f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1ns?= Date: Sat, 15 Feb 2020 13:22:00 +0000 Subject: [PATCH 035/120] Translated using Weblate (Galician) Currently translated at 100.0% (3772 of 3772 strings) --- OsmAnd/res/values-gl/phrases.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-gl/phrases.xml b/OsmAnd/res/values-gl/phrases.xml index 255ae682a9..31058da21b 100644 --- a/OsmAnd/res/values-gl/phrases.xml +++ b/OsmAnd/res/values-gl/phrases.xml @@ -37,7 +37,7 @@ Tenda de motos Instrumentos musicais Axencia de xornalismo - Comida ecolóxica + Produtos ecolóxicos Tenda de pinturas Tenda de animais Tenda de segunda man @@ -584,7 +584,7 @@ Acceso á Internet: rede local sen fíos Mahayana Miradoiro - Localidade + Lugar Área de descanso Deporte de motor Marco @@ -3779,4 +3779,9 @@ Número de erupcións Bicicleta pantasma Paintball + Rescate de montaña + Tenda de seguranza + Birlos + Número de referencia da pista + Base de caza \ No newline at end of file From 90a40ebb285a731f5a9c223a7b6104bdeada9982 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Fri, 14 Feb 2020 17:05:09 +0000 Subject: [PATCH 036/120] Translated using Weblate (Danish) Currently translated at 99.7% (3759 of 3772 strings) --- OsmAnd/res/values-da/phrases.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmAnd/res/values-da/phrases.xml b/OsmAnd/res/values-da/phrases.xml index 7afcf633f0..b99dc924c5 100644 --- a/OsmAnd/res/values-da/phrases.xml +++ b/OsmAnd/res/values-da/phrases.xml @@ -62,7 +62,7 @@ Musikinstrumenter Aviskiosk Optiker - Økologiske fødevarer + Økologiske produkter Friluftsudstyr Farvehandel Dyrehandel @@ -2448,7 +2448,7 @@ Støvsuger: nej Støvsuger Freeflying (sport) - Cykelreparationsstander + Cykelreparationsstation;Cykel-selv-reparationstation Vandhane Knapbetjent: ja Knapbetjent: nej @@ -3727,11 +3727,11 @@ Udpeget Kælderindgang Helsekost - Bygger + Bygherre Destilleri Snedker Gulvlægger - Bager + Bakehouse Møbelsnedker Gebyr Kæledyrspleje @@ -3741,7 +3741,7 @@ Hævning af kontanter Hævning af kontanter: kasse Hævning af kontanter: selvbetjening - Hævning af kontanter begrænsning + Hævning af kontanter grænse Hævning af kontanter valuta Hævning af kontanter: køb kræves Hævning af kontanter: der kræves ingen køb @@ -3774,7 +3774,7 @@ Fællesskabet køn: kvinde Fællesskabets køn: mand Fællesskabet køn: blandet - Hævning af kontanter operatør + Operatør af hævning af kontanter Parkeringsplads URL Type From ee2b60f428e16fa3b3a10639621558009446be49 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Fri, 14 Feb 2020 17:48:26 +0000 Subject: [PATCH 037/120] Translated using Weblate (Danish) Currently translated at 98.9% (264 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/da/ --- OsmAnd-telegram/res/values-da/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd-telegram/res/values-da/strings.xml b/OsmAnd-telegram/res/values-da/strings.xml index 91d5d8b8f3..af5f48e160 100644 --- a/OsmAnd-telegram/res/values-da/strings.xml +++ b/OsmAnd-telegram/res/values-da/strings.xml @@ -263,4 +263,9 @@ Foreslået OsmAnd Tracker-status Tilbage til OsmAnd + Sidste opdatering fra Telegram: %1$s + Sidste svar: %1$s + Sidste opdatering fra Telegram: %1$s siden + Sidste svar: %1$s siden + %1$s siden \ No newline at end of file From 97c64e401b95a66a9bead3bc1d804c97760fe41e Mon Sep 17 00:00:00 2001 From: WaldiS Date: Fri, 14 Feb 2020 21:33:33 +0000 Subject: [PATCH 038/120] Translated using Weblate (Polish) Currently translated at 99.2% (265 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/pl/ --- OsmAnd-telegram/res/values-pl/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd-telegram/res/values-pl/strings.xml b/OsmAnd-telegram/res/values-pl/strings.xml index 3602f7b08d..7013645d29 100644 --- a/OsmAnd-telegram/res/values-pl/strings.xml +++ b/OsmAnd-telegram/res/values-pl/strings.xml @@ -266,4 +266,5 @@ Ostatnia aktualizacja z Telegramu: %1$s Ostatnia aktualizacja z Telegramu: %1$s temu %1$s temu + ERR \ No newline at end of file From 7acc6eb9fbba50e1b0175707773cad7df8f2a3a2 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Sat, 15 Feb 2020 18:07:28 +0300 Subject: [PATCH 039/120] Fix MapActivity onNewIntent --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index e775297667..032a76156e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -643,6 +643,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven @Override protected void onNewIntent(final Intent intent) { + super.onNewIntent(intent); setIntent(intent); } From ef21e94aaac2138e110921560637e824189a644a Mon Sep 17 00:00:00 2001 From: max-klaus Date: Sat, 15 Feb 2020 18:32:24 +0300 Subject: [PATCH 040/120] Fixed quick action button in night mode --- OsmAnd/src/net/osmand/plus/UiUtilities.java | 4 ++++ OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java index 21fecfb2b4..8a60737329 100644 --- a/OsmAnd/src/net/osmand/plus/UiUtilities.java +++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java @@ -123,6 +123,10 @@ public class UiUtilities { return getDrawable(id, light ? R.color.icon_color_default_light : R.color.icon_color_default_dark); } + public Drawable getMapIcon(@DrawableRes int id, boolean light) { + return getDrawable(id, light ? R.color.icon_color_default_light : 0); + } + public static Drawable getSelectableDrawable(Context ctx) { int bgResId = AndroidUtils.resolveAttribute(ctx, R.attr.selectableItemBackground); if (bgResId != 0) { diff --git a/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java b/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java index 01c85a216f..c2f8ca6ed4 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapQuickActionLayer.java @@ -281,7 +281,7 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe } private void updateQuickActionButton(boolean widgetVisible) { - quickActionButton.setImageDrawable(app.getUIUtilities().getIcon( + quickActionButton.setImageDrawable(app.getUIUtilities().getMapIcon( !widgetVisible ? R.drawable.map_quick_action : R.drawable.map_action_cancel, !nightMode)); quickActionButton.setBackgroundResource( nightMode ? R.drawable.btn_circle_night : R.drawable.btn_circle_trans); From 77e316f8e66d3f0fcf8d6a5591a9dd98b21134f1 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Sat, 15 Feb 2020 19:26:13 +0300 Subject: [PATCH 041/120] Added default widget action item to av settings fragment --- OsmAnd/res/xml/multimedia_notes.xml | 7 +++++ .../audionotes/MultimediaNotesFragment.java | 29 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/OsmAnd/res/xml/multimedia_notes.xml b/OsmAnd/res/xml/multimedia_notes.xml index 017768ef4d..a3c8569758 100644 --- a/OsmAnd/res/xml/multimedia_notes.xml +++ b/OsmAnd/res/xml/multimedia_notes.xml @@ -3,6 +3,13 @@ xmlns:tools="http://schemas.android.com/tools" android:title="@string/audionotes_plugin_name"> + + items = new ArrayList(); + List itemsValues = new ArrayList(); + items.add(getString(R.string.av_def_action_choose)); + itemsValues.add(AV_DEFAULT_ACTION_CHOOSE); + items.add(getString(R.string.av_def_action_audio)); + itemsValues.add(AV_DEFAULT_ACTION_AUDIO); + items.add(getString(R.string.av_def_action_video)); + itemsValues.add(AV_DEFAULT_ACTION_VIDEO); + items.add(getString(R.string.av_def_action_picture)); + itemsValues.add(AV_DEFAULT_ACTION_TAKEPICTURE); + + String[] entries = items.toArray(new String[0]); + Integer[] entryValues = itemsValues.toArray(new Integer[0]); + + defaultWidgetActions.setEntries(entries); + defaultWidgetActions.setEntryValues(entryValues); + } + private void setupCameraPhotoPrefs(AudioVideoNotesPlugin plugin) { Camera cam = openCamera(); setupCameraPermissionPref(cam); From f6b4b7654e53ca1923a1f30c7502b433ffa24972 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 15 Feb 2020 21:11:25 +0100 Subject: [PATCH 042/120] Fix issue with map utils --- .../main/java/net/osmand/osm/edit/OsmMapUtils.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java index d5f3ca1b55..b318953115 100644 --- a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java +++ b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java @@ -94,11 +94,21 @@ public class OsmMapUtils { } public static LatLon getWeightCenterForWay(Way w) { - Collection nodes = w.getNodes(); + List nodes = w.getNodes(); if (nodes.isEmpty()) { return null; } boolean area = w.getFirstNodeId() == w.getLastNodeId(); + // double check for area (could be negative all) + if(area) { + Node fn = w.getFirstNode(); + Node ln = w.getLastNode(); + if(fn != null && fn != null && MapUtils.getDistance(fn.getLatLon(), ln.getLatLon()) < 50) { + area = true; + } else { + area = false; + } + } LatLon ll = area ? getComplexPolyCenter(nodes) : getWeightCenterForNodes(nodes); if(ll == null) { return null; From 96292936be9815473cd7a7294a5754676929b4a3 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 15 Feb 2020 21:51:02 +0100 Subject: [PATCH 043/120] Update algorithms --- .../java/net/osmand/data/DataTileManager.java | 8 ++++++++ .../src/main/java/net/osmand/util/MapUtils.java | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/OsmAnd-java/src/main/java/net/osmand/data/DataTileManager.java b/OsmAnd-java/src/main/java/net/osmand/data/DataTileManager.java index 6a72bf16c8..ca76753bfa 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/DataTileManager.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/DataTileManager.java @@ -65,6 +65,14 @@ public class DataTileManager { int tileXDown = (int) MapUtils.getTileNumberX(zoom, longitudeDown) + 1; int tileYDown = (int) MapUtils.getTileNumberY(zoom, latitudeDown) + 1; List result = new ArrayList(); + if(tileXUp > tileXDown) { + tileXDown = tileXUp; + tileXUp = 0; + } + if(tileYUp > tileYDown) { + tileYDown = tileYUp; + tileXUp = 0; + } for (int i = tileXUp; i <= tileXDown; i++) { for (int j = tileYUp; j <= tileYDown; j++) { putObjects(i, j, result); diff --git a/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java b/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java index 7c83cb8f89..b11575eaa5 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java @@ -55,6 +55,21 @@ public class MapUtils { // Scalar multiplication between (AB, AC) return (xB - xA) * (xC - xA) + (yB - yA) * (yC - yA); } + + public static LatLon calculateMidPoint(LatLon s1, LatLon s2) { + double lat1 = s1.getLatitude() / 180 * Math.PI; + double lon1 = s1.getLongitude() / 180 * Math.PI; + double lat2 = s2.getLatitude() / 180 * Math.PI; + double lon2 = s2.getLongitude() / 180 * Math.PI; + double Bx = Math.cos(lat2) * Math.cos(lon2 - lon1); + double By = Math.cos(lat2) * Math.sin(lon2 - lon1); + double latMid = Math.atan2(Math.sin(lat1) + Math.sin(lat2), + Math.sqrt((Math.cos(lat1) + Bx) * (Math.cos(lat1) + Bx) + By * By)); + double lonMid = lon1 + Math.atan2(By, Math.cos(lat1) + Bx); + LatLon m = new LatLon(MapUtils.checkLatitude(latMid * 180 / Math.PI), + MapUtils.checkLongitude(lonMid * 180 / Math.PI)); + return m; + } public static double getOrthogonalDistance(double lat, double lon, double fromLat, double fromLon, double toLat, double toLon) { return getDistance(getProjection(lat, lon, fromLat, fromLon, toLat, toLon), lat, lon); From 2b945f02cc4d0c9b63e0d69cde6d740fa7bb1fee Mon Sep 17 00:00:00 2001 From: Mr-Update Date: Sat, 15 Feb 2020 19:47:01 +0000 Subject: [PATCH 044/120] Translated using Weblate (German) Currently translated at 99.9% (3183 of 3184 strings) --- OsmAnd/res/values-de/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index c856e66b7d..3243c4ed99 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -2383,7 +2383,7 @@ Lon %2$s Nautische Tiefenlinien Nautische Meerestiefen der Südhalbkugel Nautische Meerestiefen der Nordhalbkugel - Nautische Tiefenkonturen + Nautische Tiefenlinien Seekarten Auf der Karte auswerten Sichtbar @@ -3417,7 +3417,7 @@ Lon %2$s Fett Für Wüsten und andere dünn besiedelte Gebiete. Umfangreicher. Positionssymbol während der Bewegung - Positionssymbol im Ruhezustand + Positionssymbol in Ruhe Durch Tippen auf \'Anwenden\' werden entfernte Profile dauerhaft gelöscht. Hauptprofil Farbe wählen @@ -3425,7 +3425,7 @@ Lon %2$s Profile bearbeiten Der \'Navigationstyp\' bestimmt, wie die Routen berechnet werden. Profildarstellung - Symbol, Farbe und Namen + Symbol, Farbe und Name Profilliste bearbeiten Ausgewähltes Profil Durch Tippen auf %1$s werden alle Ihre Änderungen verworfen. @@ -3486,8 +3486,8 @@ Lon %2$s Durch das Zurücksetzen auf die Standardeinstellung wird die Sortierung auf den Standardzustand nach der Installation zurückgesetzt. Eingabehilfenmodus ist in Ihrem System deaktiviert. Zeitlimit für den Systembildschirm verwenden - Standardmäßig deaktiviert. Wenn OsmAnd im Vordergrund läuft, wird der Bildschirm nicht ausgeblendet. -\n + Standardmäßig deaktiviert. Wenn OsmAnd im Vordergrund läuft, wird der Bildschirm nicht ausgeblendet. +\n \nWenn aktiviert, verwendet OsmAnd das Zeitlimit für den Systembildschirm. Online-Aufzeichnung Aufgezeichnete Daten löschen From 4ae1c09fc0aedc8d9c551bf2a38d9dc7b61627a4 Mon Sep 17 00:00:00 2001 From: marzzzello Date: Sat, 15 Feb 2020 23:44:58 +0000 Subject: [PATCH 045/120] Translated using Weblate (German) Currently translated at 99.9% (3183 of 3184 strings) --- OsmAnd/res/values-de/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 3243c4ed99..6b6ff01e45 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -3539,4 +3539,10 @@ Lon %2$s Das importierte Profil enthält zusätzliche Daten. Klicken Sie auf \'Importieren\', um nur Profildaten zu importieren, oder wählen Sie zusätzliche Daten zum Importieren aus. Sie können zusätzliche Daten zum Exportieren zusammen mit dem Profil auswählen. Antarktis + Du findest deine noch nicht übertragenen OSM-Änderungen oder Fehlermeldungen in %1$s. Hochgeladene Punkte werden nicht mehr angezeigt. + Empfehlung: Versuche zunächst die Bewegungserkennung über den Filter zur Mindestabstandsmessung (B) zu verwenden. Das kann zu besseren Ergebnissen führen, und du wirst weniger Daten verlieren. Sollten deine Tracks bei niedrigen Geschwindigkeiten ungenau bleiben, versuche hier Werte ungleich Null. Bitte beachte, dass einige Messungen möglicherweise überhaupt keine Geschwindigkeitswerte anzeigen (einige netzwerkbasierte Methoden), in diesem Fall wird nichts aufgezeichnet. + Es werden nur Punkte aufgezeichnet, die gemäß den Angaben der Mindestgenauigkeit gemessen wurden (in Metern/Fuß, wie von Android je nach Chipsatz bereitgestellt). Die Genauigkeit bezieht sich auf die Streuung wiederholter Messungen und steht nicht unmittelbar in Bezug zur Präzision, die bestimmt, wie nah Messungen und wahre Position beieinander liegen. + Bemerkung: Wenn das GPS unmittelbar vor einer Aufzeichnung ausgeschaltet war, kann der erste gemessene Punkt eine verminderte Genauigkeit haben, sodass wir in unserem Code vielleicht eine Sekunde oder so warten wollen, bevor ein Punkt aufgezeichnet wird (oder der beste von 3 aufeinanderfolgenden Punkten, usw.), aber das ist noch nicht implementiert. + Aufzeichnungsteilung + Direkt zum Punkt \ No newline at end of file From 2f6c545d30f15af985fbf7104f37eb75851ff325 Mon Sep 17 00:00:00 2001 From: Mr-Update Date: Sun, 16 Feb 2020 10:09:56 +0000 Subject: [PATCH 046/120] Translated using Weblate (German) Currently translated at 99.9% (3183 of 3184 strings) --- OsmAnd/res/values-de/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 6b6ff01e45..aea41b79ef 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -3493,10 +3493,10 @@ Lon %2$s Aufgezeichnete Daten löschen Koordinaten kopieren Bemerkung: Geschwindigkeit > 0 Kontrolle: Die meisten GPS-Chipsätze geben nur dann einen Geschwindigkeitswert an, wenn der Algorithmus feststellt, dass Sie in Bewegung sind, und keinen, wenn Sie nicht in Bewegung sind. Die Verwendung der Einstellung > 0 in diesem Filter nutzt also gewissermaßen die Bewegungserkennung des GPS-Chipsatzes. Aber selbst wenn nicht zur Aufnahmezeit gefiltert wurde, verwenden wir diese Funktion in unserer GPX-Analyse, um die Distanz korrigiert zu bestimmen, d. h., der in diesem Feld angezeigte Wert ist die während der Bewegung aufgezeichnete Distanz. - Nebeneffekt: Als Ergebnis der Filterung nach Genauigkeit können Punkte z.B. unter Brücken, unter Bäumen, zwischen hohen Gebäuden oder bei bestimmten Wetterbedingungen ganz fehlen. + Nebeneffekt: Als Ergebnis der Filterung nach Genauigkeit können Punkte z. B. unter Brücken, unter Bäumen, zwischen hohen Gebäuden oder bei bestimmten Wetterbedingungen ganz fehlen. Empfehlung: Es ist schwer vorherzusagen, was aufgezeichnet wird und was nicht, es ist vielleicht am besten, diesen Filter auszuschalten. - Dieser Filter verhindert, dass doppelte Punkte aufgenommen werden, bei denen möglicherweise zu wenig tatsächliche Bewegung stattgefunden hat, und sorgt für ein schöneres räumliches Erscheinungsbild von Spuren, die später nicht nachbearbeitet werden. - Nebenwirkungen: Die Ruhephasen werden nicht oder nur an jeweils einem Punkt erfasst. Kleine (reale) Bewegungen (z.B. seitwärts, um eine mögliche Abzweigung auf Ihrer Reise zu markieren) können herausgefiltert werden. Ihre Datei enthält weniger Informationen für die Nachbearbeitung und hat schlechtere Statistiken, da offensichtlich überflüssige Punkte zur Aufzeichnungszeit herausgefiltert werden, während Artefakte, die durch schlechten Empfang oder GPS-Chipsatzeffekte verursacht wurden, möglicherweise erhalten bleiben. + Dieser Filter verhindert, dass doppelte Punkte aufgenommen werden, bei denen möglicherweise zu wenig tatsächliche Bewegung stattgefunden hat. Er sorgt für ein schöneres räumliches Erscheinungsbild von Spuren, die später nicht nachbearbeitet werden. + Nebenwirkungen: Die Ruhephasen werden nicht oder nur an jeweils einem Punkt erfasst. Kleine (reale) Bewegungen (z. B. seitwärts, um eine mögliche Abzweigung auf Ihrer Reise zu markieren) können herausgefiltert werden. Ihre Datei enthält weniger Informationen für die Nachbearbeitung und hat schlechtere Statistiken, da offensichtlich überflüssige Punkte zur Aufzeichnungszeit herausgefiltert werden, während möglicherweise Artefakte erhalten bleiben, die durch schlechten Empfang oder GPS-Chipsatzeffekte verursacht wurden. Empfehlung: Eine Einstellung von 5 Metern kann für Sie gut funktionieren, wenn Sie keine feineren Details erfassen müssen und keine explizite Datenerfassung im Ruhezustand wünschen. • Profile: jetzt können Sie die Reihenfolge ändern, das Symbol für die Karte festlegen, alle Einstellungen für die Basisprofile ändern und sie wieder auf die Standardeinstellungen zurücksetzen \n @@ -3539,10 +3539,10 @@ Lon %2$s Das importierte Profil enthält zusätzliche Daten. Klicken Sie auf \'Importieren\', um nur Profildaten zu importieren, oder wählen Sie zusätzliche Daten zum Importieren aus. Sie können zusätzliche Daten zum Exportieren zusammen mit dem Profil auswählen. Antarktis - Du findest deine noch nicht übertragenen OSM-Änderungen oder Fehlermeldungen in %1$s. Hochgeladene Punkte werden nicht mehr angezeigt. - Empfehlung: Versuche zunächst die Bewegungserkennung über den Filter zur Mindestabstandsmessung (B) zu verwenden. Das kann zu besseren Ergebnissen führen, und du wirst weniger Daten verlieren. Sollten deine Tracks bei niedrigen Geschwindigkeiten ungenau bleiben, versuche hier Werte ungleich Null. Bitte beachte, dass einige Messungen möglicherweise überhaupt keine Geschwindigkeitswerte anzeigen (einige netzwerkbasierte Methoden), in diesem Fall wird nichts aufgezeichnet. - Es werden nur Punkte aufgezeichnet, die gemäß den Angaben der Mindestgenauigkeit gemessen wurden (in Metern/Fuß, wie von Android je nach Chipsatz bereitgestellt). Die Genauigkeit bezieht sich auf die Streuung wiederholter Messungen und steht nicht unmittelbar in Bezug zur Präzision, die bestimmt, wie nah Messungen und wahre Position beieinander liegen. - Bemerkung: Wenn das GPS unmittelbar vor einer Aufzeichnung ausgeschaltet war, kann der erste gemessene Punkt eine verminderte Genauigkeit haben, sodass wir in unserem Code vielleicht eine Sekunde oder so warten wollen, bevor ein Punkt aufgezeichnet wird (oder der beste von 3 aufeinanderfolgenden Punkten, usw.), aber das ist noch nicht implementiert. + Sie finden Ihre noch nicht übertragenen Änderungen oder OSM-Fehler in %1$s. Hochgeladene Punkte werden nicht mehr angezeigt. + Empfehlung: Versuchen Sie zunächst, die Bewegungserkennung über den Filter zur Mindestabstandsmessung (B) zu verwenden. Das kann zu besseren Ergebnissen führen und Sie werden weniger Daten verlieren. Sollten Ihre Tracks bei niedrigen Geschwindigkeiten ungenau bleiben, versuchen Sie hier Werte ungleich Null. Bitte beachten Sie, dass einige Messungen (einige netzwerkbasierte Methoden) möglicherweise überhaupt keine Geschwindigkeitswerte anzeigen. In diesem Fall wird nichts aufgezeichnet. + Es werden nur Punkte aufgezeichnet, die gemäß den Angaben der Mindestgenauigkeit gemessen wurden (in Metern/Fuß, wie von Android je nach Chipsatz bereitgestellt). Die Genauigkeit bezieht sich auf die Streuung wiederholter Messungen und steht nicht unmittelbar in Bezug zur Präzision, die bestimmt, wie nah Messungen und wahre Position beieinanderliegen. + Bemerkung: Wenn das GPS unmittelbar vor einer Aufzeichnung ausgeschaltet war, kann der erste gemessene Punkt eine verminderte Genauigkeit haben, sodass wir in unserem Code vielleicht eine Sekunde oder so warten wollen, bevor ein Punkt (oder der beste von 3 aufeinanderfolgenden Punkten usw.) aufgezeichnet wird. Das ist aber noch nicht implementiert. Aufzeichnungsteilung Direkt zum Punkt \ No newline at end of file From 34d3b2aec5ba95000163c8598f1d411b056aac49 Mon Sep 17 00:00:00 2001 From: josep constanti Date: Sat, 15 Feb 2020 19:57:18 +0000 Subject: [PATCH 047/120] Translated using Weblate (Catalan) Currently translated at 87.4% (2784 of 3184 strings) --- OsmAnd/res/values-ca/strings.xml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index aab5b44348..217bcd5db1 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -1106,13 +1106,13 @@ Memòria proporcional %4$s MB (límit de l\'Android %5$s MB, Dalvik %6$s MB).Camió Preferència per autopistes Preferència per autopistes - Evita vies de peatge + Sense vies de peatge Evita les vies de peatge - Evita les vies sense pavimentar + Només vies pavimentades Evita les vies sense pavimentar. - Evita transbordadors + Sense transbordadors Evita els transbordadors - Evita autopistes + Sense autopistes Evita autopistes Límit de pes Especifica el límit de pes permès del vehicle a les rutes. @@ -1653,7 +1653,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu OsmAnd Mapes fora de línia\ni navegació Publica els PDI - Evita tren llançadora + Sense trens llançadora Evita l\'ús de trens llançadora Connectors Bàsic @@ -1807,9 +1807,9 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Utilitza el tauler Utilitza el menú Especifiqueu el tipus de PDI adient o deixeu-ho buit. - Evita les escales - Evita les escales - Evita els pasos fronterers + Sense escales + Sense escales + Sense pasos fronterers Rutes a cavall No s\'ha determinat cap adreça Prop de @@ -2098,7 +2098,7 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu Mostra la cerca de llegat Afegeix la cerca de llegat en la llista desplegable. Utilitza les autopistes - Permet les autopistes + Admet autopistes. Serbi (llatí) Xinès (Hong Kong) Gruix de la corba de nivell @@ -3007,7 +3007,7 @@ Abasta l\'àrea: %1$s x %2$s Mil·liradiants Unitat angular Canvia la unitat de mesura de l\'azimut. - Evita els empedrats i els llambordins + Sense empedrats ni llambordins Evita els empedrats i els llambordins Sense el tram Evita el tram @@ -3467,4 +3467,15 @@ Abasta l\'àrea: %1$s x %2$s Afegeix una categoria personalitzada Mostra només de nit Tots els ajustaments dels connectors s\'han restaurat a l\'estat predeterminat. + Trineu + Esborra les dades registrades + Copia les coordenades + Proporcioneu un nom per al perfil + Obre la configuració + Connector desactivat + Aquest connector és una aplicació independent, us caldrà esborrar-la apart si ja no penseu utilitzar-la +\n +\nEl connector continua al dispositiu encara que desinstal·leu OsmAnd. + Menú + %1$s — %2$s — %3$s \ No newline at end of file From 27ac6fa68d6cc0f59325b0af61a85709cb39201b Mon Sep 17 00:00:00 2001 From: Roberto GEB Date: Sun, 16 Feb 2020 00:52:18 +0000 Subject: [PATCH 048/120] Translated using Weblate (Spanish) Currently translated at 95.3% (3036 of 3184 strings) --- OsmAnd/res/values-es/strings.xml | 41 ++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index b881745d21..9a7c209446 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -3418,8 +3418,8 @@ %1$s %2$s %1$s: %2$s Tasa - El archivo \'%1$s\' no contiene reglas de enrutado, por favor elige otro archivo. - Tipo de archivo no admitido. Tienes que seleccionar un archivo con la extensión %1$s. + No hay reglas de enrutado en \"%1$s\". Por favor, elige otro archivo. + Selecciona un archivo con la extensión %1$s en su lugar. Importar desde archivo Importar archivo de enrutado Importar perfil @@ -3482,4 +3482,41 @@ \n • Se ha añadido el mapa de la Antártida \n \n + Éste es un filtro de corte de baja velocidad para no registrar puntos por debajo de cierta velocidad. Esto puede hacer que las pistas grabadas sean más suaves cuando se ven en el mapa. + Recomendación: Intenta usar primero la detección de movimiento a través del filtro de desplazamiento mínimo (B), puede producir mejores resultados, y perderás menos datos. Si tus trazas siguen siendo ruidosas a bajas velocidades, prueba con valores distintos de cero aquí. Ten en cuenta que algunas mediciones pueden no informar de ningún valor de velocidad (algunos métodos basados en la red), en cuyo caso no se registraría nada. + Observación: comprobación de velocidad > 0: La mayoría de los chips de GPS reportan un valor de velocidad sólo si el algoritmo determina que estás en movimiento, y ninguno si no lo estás. Por lo tanto, usar el ajuste > 0 en este filtro en cierto sentido utiliza la detección de movimiento de los chips del GPS. Pero incluso si no se filtra aquí en el momento de la grabación, seguimos utilizando esta característica en nuestro análisis de GPX para determinar la distancia corregida, es decir, el valor mostrado en ese campo es la distancia registrada miestras está en movimiento. + Esto registrará sólo los puntos medidos con una precisión mínima indicada (en metros/pies, según lo informado por Android para tu conjunto de chips). La precisión se refiere a la dispersión de las mediciones repetidas, y no está directamente relacionada con la precisión, lo que define lo cerca que están tus mediciones a tu verdadera posición. + Reorganizar categorías + Puedes añadir categorías personalizadas, ocultar las categorías que no te parezcan necesarias y cambiar el criterio de ordenación de la lista. La lista puede ser importada y exportada con perfiles. + Puedes añadir una nueva categoría personalizada seleccionando una o varias categorías necesarias. + Restablecer valores predeterminados restablecerá el orden de clasificación al estado predeterminado tras la instalación. + Disponible + Añadir categoría personalizada + Mostrar sólo por la noche + Todos los ajustes del complemento se restauraron al estado predeterminado. + Todos los ajustes del perfil se restauran al estado predeterminado. + %1$s/%2$s + Ocaso a las %1$s + Amanece a las %1$s + Modo de accesibilidad desactivado en el sistema. + Usar el tiempo de espera de la pantalla del sistema + Desactivado por defecto, si OsmAnd se ejecuta en primer plano, la pantalla no se apaga. +\n +\nSi está activada, OsmAnd utilizará los ajustes de tiempo de espera del sistema. + Borrar datos grabados + Copiar coordenadas + Directo al punto + Por favor, proporciona un nombre para el perfil + Abrir configuración + Complemento desactivado + Este complemento es una aplicación separada, deberás eliminarlo por separado si ya no planeas usarlo. +\n +\nEl complemento permanecerá en el dispositivo después de eliminar OsmAnd. + Menú + %1$s — %2$s — %3$s + Enrutado + Estilo de representación personalizado + Incluir datos adicionales + El perfil importado contiene datos adicionales. Pulsa en Importar para importar solo datos de perfil o seleccione datos adicionales para importar. + Puedes seleccionar datos adicionales para exportar junto con el perfil. \ No newline at end of file From 1f437ec725117529c7eaa4a98455995fc2e3328b Mon Sep 17 00:00:00 2001 From: Branko Kokanovic Date: Sat, 15 Feb 2020 22:04:37 +0000 Subject: [PATCH 049/120] Translated using Weblate (Serbian) Currently translated at 99.8% (3179 of 3184 strings) --- OsmAnd/res/values-sr/strings.xml | 157 +++++++++++++++++++------------ 1 file changed, 96 insertions(+), 61 deletions(-) diff --git a/OsmAnd/res/values-sr/strings.xml b/OsmAnd/res/values-sr/strings.xml index 1f775d57ed..c106036a67 100644 --- a/OsmAnd/res/values-sr/strings.xml +++ b/OsmAnd/res/values-sr/strings.xml @@ -31,7 +31,7 @@ Велика Британија, Индија и сличне Минимални зум: %1$s Најави… - Подесите најаве назива улица, саобраћајних упозорења (лежећи, знаци заустављања), радари, ограничења брзине. + Подесите најаве назива улица, саобраћајних упозорења (лежећи, знаци заустављања), радара и ограничења брзине. Називи улица (ТТС) Ограничење брзине Камере @@ -186,7 +186,7 @@ Фотографија %1$s %2$s Сликај Сликај - Dropbox додатак омогућава да синхронизујете путање и аудио/видео белешке са вашим Dropbox налогом. + Синхронизујете путање и аудио/видео белешке са вашим Dropbox налогом. Dropbox додатак Промени редослед Подразумевано @@ -321,15 +321,15 @@ Дели белешку Географски положај:\nШирина %1$s↵\nДужина %2$s Прегледај - Бележница + A/V белешке Карта са мреже Само путеви "Слободно %1$s " Складиште уређаја Преглед скијашке карте Преглед поморске карте - Да би се приказивала скијашка карта, нарочита карта за преглед ван мреже треба да се преузме - Да би се приказивале поморске карте, посебна карта за преглед ван мреже треба да се преузме + Преузмите посебну карту ван мреже да би приказали скијашку карту. + Преузмите посебну карту ван мреже да би приказивали поморске детаље. Уреди скуп УКЛОНИ ОЗНАКУ Стање GPS-а @@ -591,11 +591,10 @@ Изохипсе Туристички преглед карте Забелешке звука и снимака - Додатак за бележење звука и снимака омогућује да се сниме звуци, слике и видео приликом путовања, или притиском дугмета на карти, или непосредно у приручном изборнику за сваки положај на карти. + Правите аудио/видео белешке за време путовања, или кроз дугме на карти или кроз контекстни мени положаја. Положај паркирања - Додатак за положај паркирања омогућава запис положаја остављеног возила и колико је времена преостало (ако је са временским ограничењем). -\n -\nВреме и положај су видљиви на командној табли OsmAnd-а, или као справица на карти. Може се додати аларм као подсетник на Андроид календару. + Омогућава запис положаја остављеног возила и колико је времена преостало. +\n И време и положај су видљиви на командној табли, а и као справица на карти. Може се додати аларм на Андроид календару. Овај додатак додаје справицу на карти која омогућава стварање путањи тапкањем на карту, или употребу и измену постојећих GPX фајлова, ради зацртавања путовања и мерења растојања између тачака. Добијени излази се могу сачувати као GPX фајлови које се касније могу користити као водичи. Приступачност OpenStreetMap уређивање @@ -625,7 +624,7 @@ Кола Бицикл Настави навођење - Застани са навођењем + Паузирај навођење Држи Жељени језик карте Локална имена @@ -980,7 +979,7 @@ Приказуј обавештење које омогућава снимање путовања. Обавештења Настави - Застанак + Паузирај Путовање Снимљено Снимај @@ -1015,7 +1014,7 @@ Молимо, унесите име новог филтера који ће бити придодат језичку „Категорије“. Чланарина се наплаћује месечно. Можете је отказати на Гугловој продавницу кад год пожелите. Прилог ОСМ заједници - Део Вашег прилога ће бити послат корисницима ОСМ-а који учествују на изменама на OpenStreetMap-у. Чланарина остаје иста. + Део Вашег прилога ће бити послат корисницима ОСМ-а. Чланарина остаје иста. Чланарина омогућава часовне, дневне и седмичне надоградње, и неограничена преузимања свих карата. Добавите је Добавите за %1$s @@ -1079,7 +1078,7 @@ Навођење уживо ОСМ-а Одредиште није подешено Изаберите категорију - Пребачено на интерну меморију пошто је означено складиште за податке само за читање. Изаберите фасциклу за складиште у коју може да се пише. + Пребачено на интерну меморију пошто је означено складиште за податке заштићено од писања. Изаберите фасциклу за складиште у коју може да се пише. Наведите интервал логовања снимања путање приликом навођења Изаберите профиле за приказ. Изаберите врсту паркирања @@ -1090,7 +1089,7 @@ Изаберите изглед приказа Начин налажења положаја који користи позадински сервис: Изаберите стајалиште за излаз - Не гледај сличице карата са мреже на увећању преко овога. + Не гледај кареа са мреже на увећању преко овога. Мрежна или ванмрежна услуга навођења. Изаберите зграду Изаберите улицу @@ -1102,7 +1101,7 @@ Одаберите улицу која је сече Изаберите где желите складиштити карте и остале податке. Гласовни упити паузирају пуштену музику. - Заустави музику + Паузирај музику Звук мултимедије/навођења Додајте ознаке карата на карти Остале ознаке @@ -1191,7 +1190,7 @@ Горња трака Потпуни извештај Прерачунај путању - OpenStreetMap корисничко име и лозинка + OSM корисничко име и лозинка Прилози Број примаоца Измене %1$s, углед %2$s, укупно измена %3$s @@ -1213,13 +1212,19 @@ Део Ваших прилога ће бити послан корисницима ОСМ-а који отпремају измене карата те области. Поставке чланарине Молимо прво купите чланарину на OsmAnd уживо - Ова чланарина омогућава надоградње сваког сата свих светских карата. Део вредности се враћа заједници ОСМ-а и исплаћује сваком доприносиоцу ОСМ-а. Ако волите OsmAnd и ОСМ и желите да их подржите и да они подрже Вас, ово је савршен начин за то. + Ова чланарина омогућава надоградње сваког сата свих светских карата. +\n Део вредности се враћа заједници ОСМ-а и исплаћује сваком доприносиоцу ОСМ-а. +\n Ако волите OsmAnd и ОСМ и желите да их подржите и да они подрже Вас, ово је савршен начин за то. Изаберите ознаку карте Отпреми безимено Приказуј прозирну траку претраге - Нема довољно простора! {3} MB је привремено потребно, а {1} MB трајно (доступно је само {2} MB.) - Преузети {0} фајла\? {3} MB је искоришћено привременог простора, а {1} MB трајног. (од {2} MB.) - Преузети {0} фајла\? Биће искоришћено {1} MB (од {2} MB). + Нема довољно простора! +\n {3} MB је привремено потребно, а {1} MB трајно. +\n (доступно је само {2} MB.) + Преузети {0} фајла\? +\n {3} MB је искоришћено привременог простора, а {1} MB трајног. (од {2} MB.) + Преузети {0} фајла\? +\nБиће искоришћено {1} MB (од {2} MB). Отпреми белешку ОСМ-а Обрнут редослед Очистити историју ознака карата? @@ -1254,10 +1259,10 @@ Повећај област претраге Нема ничег пронађеног Промените претрагу или повећајте област претраге. - Приказ/скривање белешки ОСМ-а + Приказује или сакрива OSM белешке Прикажи белешке ОСМ-а Сакриј белешке ОСМ-а - Прикажите и сакријте ОСМ белешке на карти. + Дугме да прикажите или да сакријете OSM белешке на карти. Разврстано по удаљености Тражи у Омиљеним Сакриј почињање са нивоа увећања @@ -1278,14 +1283,14 @@ Изаберите град Претрага по поштанском броју Укључити/искључити аутоматско увећање карте - Дугме за укључивање/искључивање аутоматског зумирања карте у зависности од Ваше брзине кретања. + Дугме за укључивање/искључивање аутоматског зумирања карте. Укључи самоувећање карте Искључи самоувећање карте Постави одредиште Замени одредиште - Дугме за центрирање одредишта на средину екрана, а свако претходно означено одредиште постаје последња међутачка. + Дугме за центрирање одредишта на средину екрана, а свако претходно означено одредиште ће постати последња међутачка. Додај прву пролазну међутачку - Тапкање на акционо дугме центрира ново одредиште на средину екрана, и замењује претходно означено одредиште (ако постоји). + Дугме које центрира ново одредиште на средину екрана, и замењује претходно означено одредиште (ако постоји). Без слоја над картом Дугме за центрирање положаја екрана на прву међутачку ка одредишту. Без подвлачења @@ -1340,7 +1345,7 @@ Користи податке о висини Приказуј тачке и изобате. Поморске изобате - Заустављено + Паузирано Изглед на карти Десно Лево @@ -1496,7 +1501,7 @@ Прегледај карту и додај тачке Лењир Паузирај/Настави навођење - Тупните ову тачку за застанак или наставак навођења. + Дугме за паузирање или наставак навођења. Прикажи дијалог да је навођење завршено Почни/заустави навођење Отвара се сутра у @@ -1504,7 +1509,7 @@ Без имена Дуго или кратко притисните на „Места“, онда притисните заставицу кад се појави. Задршка усмерења карте - Тупните на ово дугме за почетак или завршетак навођења. + Дугме за почетак или завршетак навођења. Сачувај снимљене путање у месечним фасциклама Сачувај снимљене путање у подфасциклама према месецима снимања (нпр. 2018-01). Врати на подразумевано @@ -1599,7 +1604,7 @@ GPX - погодно за извоз у ЈОСМ и друге ОСМ уређиваче. ОСЦ - погодно за извоз у OSM. ОСЦ фајл - Одаберити тип извоза: ОСМ белешке, тачке од интереса или оба. + Извези као ОСМ белешке, тачке од интереса или оба. Малајалам Лаоски Волапук @@ -1797,7 +1802,7 @@ Избриши измену Асинхроно ОСМ уређивање: Тачке од интереса/белешке са ОСМ-а сачуване на уређају - Приказуј и управљај ОСМ тачкама од интереса/белешкама из базе података на уређају. + Приказуј и управљај ОСМ тачкама од интереса/белешкама из базе података са уређаја. Прикажи тренутну путању Бесплатна верзија Приказуј опис тачака од интереса. @@ -2140,7 +2145,7 @@ Апликација за навођење Нађи још Најближе услуге - Унесите ширину & дужину у одабраном формату (D - степени, M - минути, S - секунде) + Унесите ширину и дужину у одабраном формату (D - степени, M - минути, S - секунде) DDD.DDDDD Раскрсница улица Ажурирај карту @@ -2467,7 +2472,7 @@ Бесплатни светски туристички водич који свако може да уређује. Туристички водичи Водичи за најзанимљивија места на планети, унутар OsmAnd-а, без потребе за интернет конекцијом. - Овај додатак активира функционалност снимања и чувања Ваших путања када се притисне GPX справица за бележење на карти, а може и да аутоматски бележи све Ваше путеве којима сте навођени у GPX фајл. + Овај додатак активира функционалност снимања и чувања Ваших путања када се притисне GPX справица за бележење на карти, а може и да аутоматски бележи све Ваше путеве којима сте навођени у GPX фајл. \n \nСнимљене путање се могу делити са пријатељима или слати на ОСМ. Спортисти могу да користе снимљене путање да прате своје тренинге. Директно у OsmAnd-у може да се ради основна анализа путања, као што су рачунање брзине круга, просечна брзина итд. Наравно, путање се даље могу анализирати у другим специјалним алатима за анализу. Равнање стазе @@ -2487,7 +2492,7 @@ \n Од Авганистана до Шри Ланке, горе од Аљаске до Аустралије. Аргентина, Бразил, Канада, Француска, Немачка, Мексико, Велика Британија, Шпанија, … \n Овај додатак омогућава приказ слоја изохипси и рељефа изнад стандардних OsmAnd карти. Ову функционалност ће највише знати да цене спортисти, планинари, трекери и свако кога занима рељефна структура предела. -\n +\n \nГлобални подаци (између 70° северно и 70° јужно) се базирани на SRTM (Shuttle Radar Topography Mission) и ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), инструментима за сликање на водећем НАСА-ином сателиту Terra. ASTER је заједнички напор НАСА-е, јапанског министарства економије, трговине и индустрије (METI), и јапанског свемирског система (J-spacesystems). Овај додатак омогућава приказ слоја изохипси и рељефа изнад стандардних OsmAnd карти. Ову функционалност ће највише знати да цене спортисти, планинари, трекери и свако кога занима рељефна структура предела (приметите да су изохипсе и рељефни подаци одвојени, посебна скидања за њих су доступна када се овај додатак активира.) \n @@ -2658,8 +2663,8 @@ Време доласка у међутачку Међувреме Одабрани језик није подржан од стране инсталиране Андроидове синтезе текста у говор, биће коришћен већ подешени језик. Потражите други синтетизатор текста у говор у продавници\? - OsmAnd (OSM Automated Navigation Directions) је апликација за карте и навођење која приступа бесплатним висококвалитетним OpenStreetMap (ОСМ) подацима из целог света. -\n + OsmAnd (OSM Automated Navigation Directions) је апликација за карте и навођење која приступа бесплатним висококвалитетним OSM подацима из целог света. +\n \n Уживајте у оптичком и гласовном навођењу, прегледу тачака од интереса, прављењем и управљањем GPX путањама, коришћењем изобата и подацима о висини (кроз додатак), избору између режима вожње, бициклизма, пешачења, измена на ОСМ-у и још много тога. GPS навођење \n • Одабир између навођења преко интернета (брзо) или без интернета (не плаћате роминг када сте ван земље) @@ -2673,11 +2678,11 @@ \n • Подршка за успутне тачке на путу \n • Снимање Ваших, или отпремање GPX стаза и њихово праћење \n - OsmAnd+ (OSM Automated Navigation Directions) је апликација за карте и навођење која приступа бесплатним висококвалитетним OpenStreetMap (ОСМ) подацима из целог света. -\n Уживајте у оптичком и гласовном навођењу, прегледу тачака од интереса, прављењем и управљањем GPX путањама, коришћењем изобата и подацима о висини, избору између режима вожње, бициклизма, пешачења, измена на ОСМ-у и још много тога. -\n -\n OsmAnd+ је верзија апликације која се плаћа. Њеном куповином, подржавате пројекат, финансирате развој нових функционалности и примате најновија ажурирања. -\n + OsmAnd+ (OSM Automated Navigation Directions) је апликација за карте и навођење која приступа бесплатним висококвалитетним OSM подацима из целог света. +\n Уживајте у оптичком и гласовном навођењу, прегледу тачака од интереса, прављењем и управљањем GPX путањама, коришћењем изобата и подацима о висини, избору између режима вожње, бициклизма, пешачења, измена на ОСМ-у и још много тога. +\n +\n OsmAnd+ је верзија апликације која се плаћа. Њеном куповином, подржавате пројекат, финансирате развој нових функционалности и примате најновија ажурирања. +\n \n Неке од главних карактеристика: Навођење \n • Ради преко интернета (брзо) или без интернета (не плаћате роминг када сте ван земље) @@ -2690,7 +2695,7 @@ Измена подразумеваног стила за бољи контраст пешачких и бициклистичких путева. Користи старе Mapnik боје. OsmAnd (OSM Automated Navigation Directions) \n -\n OsmAnd је is апликација отвореног кода за навођење са приступом разним глобалним подацима OpenStreetMap-а (ОСМ). Сви подаци на карти (векторски или сличице карте) се могу ускладиштити на меморијску картицу телефона за употребу и без интернета. Нуде се могућности навођења и са и без интернет конекције, укључујући у гласовно навођење. +\n OsmAnd је is апликација отвореног кода за навођење са приступом разним глобалним подацима OSM-а. Сви подаци на карти (векторски или сличице карте) се могу ускладиштити на меморијску картицу телефона за употребу и без интернета. Нуде се могућности навођења и са и без интернет конекције, укључујући у гласовно навођење. \n \n Неке од основних могућности: \n - Комплетна функционалност рада ван мреже (складиштење скинутих векторских карти и сличица на складиште телефона) @@ -2725,11 +2730,11 @@ \n • Приказ контурних линија и висинских обриса (преко додатног додатка) OsmAnd+ (OSM Automated Navigation Directions) \n -\n OsmAnd+ је is апликација отвореног кода за навођење са приступом разним глобалним подацима OpenStreetMap-а (ОСМ). Сви подаци на карти (векторски или сличице карте) се могу ускладиштити на меморијску картицу телефона за употребу и без интернета. Нуде се могућности навођења и са и без интернет конекције, укључујући у гласовно навођење. +\n OsmAnd+ је is апликација отвореног кода за навођење са приступом разним глобалним подацима OSM-а. Сви подаци на карти (векторски или сличице карте) се могу ускладиштити на меморијску картицу телефона за употребу и без интернета. Нуде се могућности навођења и са и без интернет конекције, укључујући у гласовно навођење. \n \n OsmAnd+ је верзија апликације која се плаћа, а њеном куповином, подржавате пројекат, финансирате развој нових функционалности и примате најновија ажурирања. \n -\n Неке од основних могућности: +\n Неке од основних могућности: \n - Комплетна функционалност рада ван мреже (складиштење скинутих векторских карти и сличица на складиште телефона) \n - Доступне су целокупне векторске карте целог света за рад ван мреже \n - Неограничена преузимања држава или региона директно из апликације @@ -2740,7 +2745,7 @@ \n - Режими рада за аутомобил, бициклу и пешаке са опционим: \n - Аутоматским пребацивањем дневног/ноћног режима рада \n - Зумирањем релативним на брзину -\n - Окретањем мапе према компасу или правцу кретања +\n - Окретањем мапе према компасу или правцу кретања \n - Навођењем у праву траку, приказ ограничења брзине, снимљени и синтетизовани гласови за навођење \n Набавите OsmAnd Live да откључате ове могућности: дневна ажурирања карти са неограниченим бројем скидања, сви и плаћени и бесплатни додаци, Википедија, Wikivoyage и још много тога. @@ -2857,7 +2862,7 @@ Годишње обнављање %1$.2f %2$s Период плаћања: - Донације помажу финансирање OpenStreetMap картографа. + Донације помажу финансирање OSM картографа. Претплате Прикажи само слике од 360° Покрени @@ -2968,7 +2973,7 @@ Приказане путање Укрцавање на стајању Прикажи/сакриј GPX путање - Прекидач да прикажете или сакријете одабране GPX путање са карте. + Дугме које приказује или сакрива одабране GPX путање са карте. Сакриј GPX путање Прикажи GPX путање Омогући јавни превоз на OsmAnd Live изменама. @@ -3070,7 +3075,7 @@ Апликативни профили Жељена тежина Ван стазе - Путање ван стазе су незваничне руте и пролази. Углавном су несређене, неодржаване и не проверавају се увече. Улазите на сопствену одговорност. + ’Слободна вожња’ и ’Ван стазе’ су незваничне руте и пролази. Углавном су несређене, неодржаване и не проверавају се увече. Улазите на сопствену одговорност. OsmAnd сервис преузимања Магента Иконица @@ -3348,17 +3353,17 @@ \n • Остале исправке грешака \n \n - Користи се да процени време стизања код непознатих типова путева и да ограничи брзину на свим путевима (може да промени руту) - Можете да примените ову измену или свим профилима или само тренутно одабраном. + Процењује време стизања код непознатих типова путева, ограничава брзину на свим путевима (може да промени руту) + Можете да примените ову измену на све или на само тренутно одабраном профилу. Дељене Преферирај неасфалтиране путеве - Преферира неасфалтиране путеве. + Преферира неасфалтиране путеве испред асфалтрираних за рутирање. ОСМ измене - Прекидач да прикаже и сакрије линије изохипси на карти. + Дугме које приказује или сакрива линије изохипси на карти. Прикажи изохипсе Сакриј изохипсе Прикажи/сакриј изохипсе - Прекидач да прикаже и сакрије рељеф на карти. + Дугме које приказује или сакрива рељеф на карти. Прикажи рељеф Сакриј рељеф Прикажи/сакриј рељеф @@ -3369,7 +3374,7 @@ ’%1$s’ већ постоји. Пребрисати га\? Не могу да извезем профил. Увоз профила - Да увезете профил, одаберите фајл профила са уређаја и отворите га помоћу OsmAnd-а. + Додајте профил тако што отворите његов фајл у OsmAnd-у. %1$s грешка увоза: %2$s %1$s увезен. Бело @@ -3378,7 +3383,7 @@ Стаза сачувана Име фајла је празно Поврати - Дугме које центар екрана узима за тачку поласка и рачуна пут до одредишта или отвара дијалог за одабирање одредишта ако ознака одредишта није на карти. + Дугме које центар екрана узима за тачку поласка. После пита да одаберете одредиште или рачуна пут до одредишта. Прикажи чворове мреже бициклистичких путева Очисти %1$s\? Дијалог преузимања карте @@ -3388,7 +3393,7 @@ Предложене карте Ове карте су потребне за рад овог додатка. Додати профили - Додатак додаје нове профиле у OsmAnd + Профили додати од стране додатка Искључи Нови додатак додат Споји сегменте @@ -3400,20 +3405,20 @@ Лични Преузимам %s Дебело - За пустиње и остале ретко насељене области. Приказује више детаља на скали приказа. - Одаберите иконицу навођења + За пустиње и остале ретко насељене области. Детаљније. + Иконица положаја док се крећете Позиција иконице при мировање - Избрисани профили ће заувек бити избрисани када кликнете Примени. + Избрисани профили ће заувек бити избрисани када кликнете ’Примени’. Главни профил Одаберите боју - Не можете да обришете подразумеване OsmAnd профиле, али можете да их искључите на претходном екрану, или да их померите на дно. + Подразумевани OsmAnd профиле не могу да се избришу, али могу да се искључе (на претходном екрану), или да се ставе на дно. Измени профиле - Тип навођења утиче на правила израчунавања пута. + ’Тип навођења’ одређује како се пут израчунава. Изглед профила Иконица, боја и име Измени листу профила Изабрани профил - Кликом на %1$s, изгубићете све промене. + Кликом на %1$s ћете изгубити све промене. Ресетуј сва подешавања профила на стање после инсталације. Ресетуј сва подешавања профила\? Оцени @@ -3501,4 +3506,34 @@ Увезени профил садржи додатне податке. Кликните на Увоз да увезете да увезете само профилне податке или одаберите које додатне податке увести. Поред профила, можете одабрати додатне податке за извоз. Антарктик + Можете додати произвољне категорије, сакрити категорије које су Вам сувишне и променити им редослед у списку. Списак се може увести и извести са профилима. + • Профили: сада можете променити редослед, поставити иконицу за карту, променити све поставке основних профила и повратити их назад на подразумеване вредности +\n +\n • Додати бројеви излаза приликом навођења +\n +\n • Преуређене поставке додатака +\n +\n • Преуређен екран Поставки за бржи приступ свих профилима +\n +\n • Додата опција за копирање поставки из другог профила +\n +\n • Додата могућност да се промени редослед или да се сакрију категорије тачака од интереса у Претрази +\n +\n • Исправно поравнате иконице тачака од интереса на карти +\n +\n • Додати подаци изласка и заласка сунца на Подешавању Карте +\n +\n • На карту додата иконица Кућа/Посао +\n +\n • Додата подршка за описе из више редова у Поставкама +\n +\n • Додата исправна транслитерација на карту Јапана +\n +\n • Додата карта Антарктика +\n +\n + Овај додатак је посебна апликација, морате га посебно уклонити ако не планирате да га користите. +\n +\nДодатак ће остати на уређају и после уклањања OsmAnd апликације. + Рутирање \ No newline at end of file From 351e2bd336c0ad73ab0c246a2499a8286e43d512 Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Sun, 16 Feb 2020 12:23:05 +0000 Subject: [PATCH 050/120] Translated using Weblate (Japanese) Currently translated at 99.2% (3159 of 3184 strings) --- OsmAnd/res/values-ja/strings.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 40e32e77c1..db2cfdae99 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -506,8 +506,8 @@ POIの更新は利用できません 日本 アメリカ カナダ - ヨーロッパ、アジア、ラテンアメリカ&同様の国々 - イギリス、インド、その他類似国 + ヨーロッパ、アジア、ラテンアメリカ&左記類似国 + イギリス、インド&左記類似国 音声案内… 道路名、交通指示警告(強制停止、スピードバンプ等含む)、スピードカメラ、法定速度の音声アナウンスの設定をします。 通りの名前 (TTS形式音声のみ) @@ -1164,7 +1164,7 @@ POIの更新は利用できません 文字列 森林、低木等 ズーム15で建物表示 - 詳細 + 詳細も表示 詳細を省く 通行制限 通行制限と料金所を表示 @@ -1367,9 +1367,9 @@ POIの更新は利用できません タクシーのルート共有 トロリーバスでのルート バスでのルート - 非表示 - ルート - 詳細 + 省略したい描写 + 追加描写したいルート + 追加したい描写 交通機関の追加描写 その他のマップ属性 その他の要素 @@ -3042,9 +3042,9 @@ POIの更新は利用できません オフロード プロファイルの個別設定 設定した値は各プロファイルごとに保持されます - 指定プロファイルのマップ設定を行います - 指定プロファイルのUI(ユーザーインターフェース)設定を行います - 指定プロファイルのナビゲーション設定を行います + 指定プロファイルのマップ設定 + 指定プロファイルのUI(ユーザーインターフェース)設定 + 指定プロファイルのナビゲーション設定 乗り換えの上限を指定します 乗り換え数 方向転換時に起動 @@ -3411,11 +3411,11 @@ POIの更新は利用できません 砂漠などの過疎地に向いたマップスタイルです。各情報の詳細も表示されます。 %1$s • %2$s %1$s, %2$s - 移動中にアイコンを配置 - 静止中アイコンの設置 + 移動中の位置アイコン + 静止中の位置アイコン [適用]をタップすると、プロファイルが完全に削除されます。 マスタープロファイル - 色の選択 + プロファイルの色選択 OsmAndの標準プロファイルは削除できませんが、前の画面でそれらを無効にしたり、リストの下の方へ移動させることはできます。 プロファイルの編集 \'ナビゲーションタイプ\'は、ルート計算方法の管理をおこないます。 @@ -3468,12 +3468,12 @@ POIの更新は利用できません ルート再計算 案内 ユーザー名とパスワード - これらの設定はすべてのプロファイルに適用されます。 + 以下設定はすべてのプロファイル共通で使用されます。 OSM編集 %1$sにまだアップロードされていない編集内容やOSMバグを表示します。アップロード後には表示されなくなります。 OSM - ナビゲーションまたは移動中にアイコンが表示されます。 - 静止時にアイコンが表示されます + ナビゲーションまたは移動中に表示されるアイコンです。 + 静止時に表示されるアイコンです。 プラグイン設定を初期値に戻す 記録を分割 システムアプリを使用 From 880b229d8951b2f5faa57ed4e04485714e27ff74 Mon Sep 17 00:00:00 2001 From: Rpnpif Date: Sun, 16 Feb 2020 13:04:52 +0000 Subject: [PATCH 051/120] Translated using Weblate (French) Currently translated at 99.8% (3766 of 3772 strings) --- OsmAnd/res/values-fr/phrases.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-fr/phrases.xml b/OsmAnd/res/values-fr/phrases.xml index 657aa3e34e..04803224f4 100644 --- a/OsmAnd/res/values-fr/phrases.xml +++ b/OsmAnd/res/values-fr/phrases.xml @@ -240,7 +240,7 @@ ONG Boite de nuit; Boîte de nuit Opticien - Produits biologiques + Produits de l\'agriculture biologique Course d\'orientation Magasin d\'activités de plein air Paddel-tennis @@ -1694,7 +1694,7 @@ Poteau de ligne électrique Tour de refroidissement Pylône d\'éclairage - Organique + De l\'agriculture biologique Produits blancs Mercure Mousse de polystyrène From acf6d7b91ee3f5e58d30c4b2427c69431c721242 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 16 Feb 2020 19:31:42 +0200 Subject: [PATCH 052/120] Fix #4635 --- OsmAnd/res/values/strings.xml | 2 ++ OsmAnd/res/xml/navigation_settings_new.xml | 8 ++++++++ OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 ++ .../osmand/plus/notifications/NavigationNotification.java | 2 +- .../src/net/osmand/plus/settings/NavigationFragment.java | 7 +++++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 0251cf49e1..eebc81d6f1 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,8 @@ Thx - Hardy --> + Display a system notification allowing navigation. + Navigation notification Please provide a name for the profile Open settings Plugin disabled diff --git a/OsmAnd/res/xml/navigation_settings_new.xml b/OsmAnd/res/xml/navigation_settings_new.xml index 50df1cdf35..d01598fd24 100644 --- a/OsmAnd/res/xml/navigation_settings_new.xml +++ b/OsmAnd/res/xml/navigation_settings_new.xml @@ -72,4 +72,12 @@ android:summaryOn="@string/shared_string_on" android:title="@string/animate_my_location" /> + + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 90049786d8..ea87506c44 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1973,6 +1973,8 @@ public class OsmandSettings { SHOW_ZOOM_BUTTONS_NAVIGATION.setModeDefaultValue(ApplicationMode.PEDESTRIAN, true); } + public final CommonPreference SHOW_NAVIGATION_NOTIFICATION = new BooleanPreference("show_navigation_notification", true).makeProfile(); + // Json public final OsmandPreference SELECTED_GPX = new StringPreference("selected_gpx", "").makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java index 82bc936d22..c75aadd412 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java @@ -121,7 +121,7 @@ public class NavigationNotification extends OsmandNotification { @Override public Builder buildNotification(boolean wearable) { - if (!isEnabled()) { + if (!isEnabled() || !app.getSettings().SHOW_NAVIGATION_NOTIFICATION.get()) { return null; } NavigationService service = app.getNavigationService(); diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index ba7b3ab808..296f6c8319 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -63,6 +63,7 @@ public class NavigationFragment extends BaseSettingsFragment { setupSpeakRoutingAlarmsPref(); setupVehicleParametersPref(); + setupNavigationNotificationPref(); animateMyLocation.setDescription(getString(R.string.animate_my_location_desc)); } @@ -260,6 +261,12 @@ public class NavigationFragment extends BaseSettingsFragment { vehicleParameters.setIcon(getContentIcon(iconRes)); } + private void setupNavigationNotificationPref() { + SwitchPreferenceEx navigationNotification = (SwitchPreferenceEx) findPreference(settings.SHOW_NAVIGATION_NOTIFICATION.getId()); + navigationNotification.setDescription(getString(R.string.navigation_notification_desc)); + navigationNotification.setIcon(getPersistentPrefIcon(R.drawable.ic_action_notification)); + } + private void updateMenu() { MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { From b94cce6b9606503ac9817147fc431cfb321228a5 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Sun, 16 Feb 2020 23:06:50 +0200 Subject: [PATCH 053/120] Fix #8406 Add Save/Clear current GPX track functionality --- .../plus/helpers/ExternalApiHelper.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java index 64ed3acfcb..7b5b5b2f44 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java @@ -92,6 +92,8 @@ public class ExternalApiHelper { public static final String API_CMD_START_GPX_REC = "start_gpx_rec"; public static final String API_CMD_STOP_GPX_REC = "stop_gpx_rec"; + public static final String API_CMD_SAVE_GPX_TRACK = "save_gpx_track"; + public static final String API_CMD_CLEAR_GPX_TRACK = "clear_gpx_track"; public static final String API_CMD_SUBSCRIBE_VOICE_NOTIFICATIONS = "subscribe_voice_notifications"; public static final int VERSION_CODE = 1; @@ -554,6 +556,24 @@ public class ExternalApiHelper { finish = true; } resultCode = Activity.RESULT_OK; + } else if (API_CMD_SAVE_GPX_TRACK.equals(cmd)) { + OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class); + if (plugin == null) { + resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE; + finish = true; + } else { + plugin.saveCurrentTrack(); + } + resultCode = Activity.RESULT_OK; + } else if (API_CMD_CLEAR_GPX_TRACK.equals(cmd)) { + OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class); + if (plugin == null) { + resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE; + finish = true; + } else { + app.getSavingTrackHelper().clearRecordedData(true); + } + resultCode = Activity.RESULT_OK; } else if (API_CMD_SUBSCRIBE_VOICE_NOTIFICATIONS.equals(cmd)) { // not implemented yet resultCode = RESULT_CODE_ERROR_NOT_IMPLEMENTED; From 3649c2da4905176d0a1b3f9641a27cef47c44b46 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Sun, 16 Feb 2020 23:22:14 +0200 Subject: [PATCH 054/120] Fix Manage Profiles (rename some titles) --- .../plus/settings/ProfileAppearanceFragment.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index 8c950fea45..24229c2680 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -28,6 +28,7 @@ import android.view.inputmethod.EditorInfo; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.ImageView; +import android.widget.TextView; import net.osmand.AndroidUtils; import net.osmand.PlatformUtil; @@ -151,6 +152,17 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { isNewProfile = ApplicationMode.valueOfStringKey(changedProfile.stringKey, null) == null; } + @Override + protected void createToolbar(LayoutInflater inflater, View view) { + super.createToolbar(inflater, view); + if (isNewProfile) { + TextView toolbarSubtitle = (TextView) view.findViewById(R.id.toolbar_subtitle); + if (toolbarSubtitle != null) { + toolbarSubtitle.setText(getString(R.string.new_profile)); + } + } + } + private String createNonDuplicateName(String oldName) { int suffix = 0; int i = oldName.length() - 1; @@ -343,7 +355,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { ? changedProfile.parent.toHumanString() : getSelectedAppMode().toHumanString()); OsmandTextFieldBoxes baseProfileNameHint = (OsmandTextFieldBoxes) holder.findViewById(R.id.master_profile_otfb); - baseProfileNameHint.setLabelText(getString(R.string.master_profile)); + baseProfileNameHint.setLabelText(getString(R.string.profile_type_base_string)); FrameLayout selectNavTypeBtn = (FrameLayout) holder.findViewById(R.id.select_nav_type_btn); selectNavTypeBtn.setOnClickListener(new View.OnClickListener() { @Override From 00237eabda240b1906a60e403d9360f2765d629f Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 17 Feb 2020 11:16:57 +0200 Subject: [PATCH 055/120] Change notification preference description --- OsmAnd/res/values/strings.xml | 2 +- .../net/osmand/plus/monitoring/MonitoringSettingsFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index eebc81d6f1..99f2e9c967 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,7 +11,7 @@ Thx - Hardy --> - Display a system notification allowing navigation. + Show system notification while navigation with navigation instructions. Navigation notification Please provide a name for the profile Open settings diff --git a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java index 9216fe9210..9b05493363 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java @@ -200,7 +200,7 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment private void setupShowTripRecNotificationPref() { SwitchPreferenceEx showTripRecNotification = (SwitchPreferenceEx) findPreference(settings.SHOW_TRIP_REC_NOTIFICATION.getId()); - showTripRecNotification.setDescription(getString(R.string.trip_rec_notification_settings)); + showTripRecNotification.setDescription(getString(R.string.trip_rec_notification_settings_desc)); showTripRecNotification.setIcon(getPersistentPrefIcon(R.drawable.ic_action_notification)); } From 0739829d8de6789003b37fb92174b4065415bc89 Mon Sep 17 00:00:00 2001 From: Nazar Date: Mon, 17 Feb 2020 11:26:23 +0200 Subject: [PATCH 056/120] Add auto close condition Rename --- .../net/osmand/plus/helpers/ExternalApiHelper.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java index 7b5b5b2f44..9bd9a26ccf 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java @@ -92,8 +92,8 @@ public class ExternalApiHelper { public static final String API_CMD_START_GPX_REC = "start_gpx_rec"; public static final String API_CMD_STOP_GPX_REC = "stop_gpx_rec"; - public static final String API_CMD_SAVE_GPX_TRACK = "save_gpx_track"; - public static final String API_CMD_CLEAR_GPX_TRACK = "clear_gpx_track"; + public static final String API_CMD_SAVE_CURRENT_GPX = "save_current_gpx"; + public static final String API_CMD_CLEAR_CURRENT_GPX = "clear_current_gpx"; public static final String API_CMD_SUBSCRIBE_VOICE_NOTIFICATIONS = "subscribe_voice_notifications"; public static final int VERSION_CODE = 1; @@ -556,7 +556,7 @@ public class ExternalApiHelper { finish = true; } resultCode = Activity.RESULT_OK; - } else if (API_CMD_SAVE_GPX_TRACK.equals(cmd)) { + } else if (API_CMD_SAVE_CURRENT_GPX.equals(cmd)) { OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class); if (plugin == null) { resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE; @@ -564,8 +564,11 @@ public class ExternalApiHelper { } else { plugin.saveCurrentTrack(); } + if (uri.getBooleanQueryParameter(PARAM_CLOSE_AFTER_COMMAND, true)) { + finish = true; + } resultCode = Activity.RESULT_OK; - } else if (API_CMD_CLEAR_GPX_TRACK.equals(cmd)) { + } else if (API_CMD_CLEAR_CURRENT_GPX.equals(cmd)) { OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class); if (plugin == null) { resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE; @@ -573,6 +576,9 @@ public class ExternalApiHelper { } else { app.getSavingTrackHelper().clearRecordedData(true); } + if (uri.getBooleanQueryParameter(PARAM_CLOSE_AFTER_COMMAND, true)) { + finish = true; + } resultCode = Activity.RESULT_OK; } else if (API_CMD_SUBSCRIBE_VOICE_NOTIFICATIONS.equals(cmd)) { // not implemented yet From 7cd3e678f085a5539ae2ad3c32697a6a747a2a04 Mon Sep 17 00:00:00 2001 From: Nazar Date: Mon, 17 Feb 2020 11:40:13 +0200 Subject: [PATCH 057/120] Rename p.2 --- OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java index 9bd9a26ccf..4cc790d587 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ExternalApiHelper.java @@ -92,8 +92,8 @@ public class ExternalApiHelper { public static final String API_CMD_START_GPX_REC = "start_gpx_rec"; public static final String API_CMD_STOP_GPX_REC = "stop_gpx_rec"; - public static final String API_CMD_SAVE_CURRENT_GPX = "save_current_gpx"; - public static final String API_CMD_CLEAR_CURRENT_GPX = "clear_current_gpx"; + public static final String API_CMD_SAVE_GPX = "save_gpx"; + public static final String API_CMD_CLEAR_GPX = "clear_gpx"; public static final String API_CMD_SUBSCRIBE_VOICE_NOTIFICATIONS = "subscribe_voice_notifications"; public static final int VERSION_CODE = 1; @@ -556,7 +556,7 @@ public class ExternalApiHelper { finish = true; } resultCode = Activity.RESULT_OK; - } else if (API_CMD_SAVE_CURRENT_GPX.equals(cmd)) { + } else if (API_CMD_SAVE_GPX.equals(cmd)) { OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class); if (plugin == null) { resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE; @@ -568,7 +568,7 @@ public class ExternalApiHelper { finish = true; } resultCode = Activity.RESULT_OK; - } else if (API_CMD_CLEAR_CURRENT_GPX.equals(cmd)) { + } else if (API_CMD_CLEAR_GPX.equals(cmd)) { OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class); if (plugin == null) { resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE; From 2f3474766ee656fc194e452d3bc912f0eaffa623 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 17 Feb 2020 11:43:08 +0200 Subject: [PATCH 058/120] Add default attributes to custom routing config --- .../osmand/router/RoutingConfiguration.java | 23 ++++++++++++++----- .../src/net/osmand/plus/AppInitializer.java | 18 +++++++++++++-- .../net/osmand/plus/OsmandApplication.java | 21 +++++++++++++++++ .../SettingsNavigationActivity.java | 20 +++------------- .../plus/helpers/AvoidSpecificRoads.java | 22 ++++++++++++++---- .../net/osmand/plus/helpers/ImportHelper.java | 3 --- .../RoutingOptionsHelper.java | 9 ++++---- .../osmand/plus/routing/RouteProvider.java | 3 +-- .../plus/settings/NavigationFragment.java | 3 +-- .../settings/RouteParametersFragment.java | 2 +- .../settings/VehicleParametersFragment.java | 3 +-- 11 files changed, 83 insertions(+), 44 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java index f09fdf2b10..0a1b87e6e5 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RoutingConfiguration.java @@ -55,7 +55,15 @@ public class RoutingConfiguration { private String defaultRouter = ""; private Map routers = new LinkedHashMap<>(); private Map attributes = new LinkedHashMap<>(); - private static HashMap impassableRoadLocations = new HashMap<>(); + private HashMap impassableRoadLocations = new HashMap<>(); + + public Builder() { + + } + + public Builder(Map defaultAttributes) { + attributes.putAll(defaultAttributes); + } // Example // { @@ -103,19 +111,22 @@ public class RoutingConfiguration { return i; } - public static Map getImpassableRoadLocations() { + public Map getImpassableRoadLocations() { return impassableRoadLocations; } - public static boolean addImpassableRoad(RouteDataObject route, Location location) { + public boolean addImpassableRoad(RouteDataObject route, Location location) { if (!impassableRoadLocations.containsKey(route.id)){ impassableRoadLocations.put(route.id, location); return true; } return false; } - - + + public Map getAttributes() { + return attributes; + } + private String getAttribute(VehicleRouter router, String propertyName) { if (router.containsAttribute(propertyName)) { return router.getAttribute(propertyName); @@ -148,7 +159,7 @@ public class RoutingConfiguration { return routers; } - public static void removeImpassableRoad(RouteDataObject obj) { + public void removeImpassableRoad(RouteDataObject obj) { impassableRoadLocations.remove(obj.id); } } diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index 90b1ee44da..e786c80f12 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -599,8 +599,9 @@ public class AppInitializer implements IProgress { @Override protected Map doInBackground(Void... voids) { - RoutingConfiguration.getDefault(); // load default builder + Map defaultAttributes = getDefaultAttributes(); Map customConfigs = new HashMap<>(); + File routingFolder = app.getAppPath(IndexConstants.ROUTING_PROFILES_DIR); if (routingFolder.isDirectory()) { File[] fl = routingFolder.listFiles(); @@ -609,7 +610,7 @@ public class AppInitializer implements IProgress { if (f.isFile() && f.getName().endsWith(IndexConstants.ROUTING_FILE_EXT) && f.canRead()) { try { String fileName = f.getName(); - RoutingConfiguration.Builder builder = new RoutingConfiguration.Builder(); + RoutingConfiguration.Builder builder = new RoutingConfiguration.Builder(defaultAttributes); RoutingConfiguration.parseFromInputStream(new FileInputStream(f), fileName, builder); customConfigs.put(fileName, builder); @@ -630,6 +631,19 @@ public class AppInitializer implements IProgress { } callback.onRoutingFilesLoaded(); } + + private Map getDefaultAttributes() { + Map defaultAttributes = new HashMap<>(); + RoutingConfiguration.Builder builder = RoutingConfiguration.getDefault(); + for (Map.Entry entry : builder.getAttributes().entrySet()) { + String key = entry.getKey(); + if (!"routerName".equals(key)) { + defaultAttributes.put(key, entry.getValue()); + } + } + return defaultAttributes; + } + }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 3bb700ca3d..af2556c064 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -67,6 +67,7 @@ import net.osmand.plus.routing.TransportRoutingHelper; import net.osmand.plus.search.QuickSearchHelper; import net.osmand.plus.voice.CommandPlayer; import net.osmand.plus.wikivoyage.data.TravelDbHelper; +import net.osmand.router.GeneralRouter; import net.osmand.router.RoutingConfiguration; import net.osmand.router.RoutingConfiguration.Builder; import net.osmand.search.SearchUICore; @@ -79,6 +80,7 @@ import java.io.FileWriter; import java.io.PrintStream; import java.lang.Thread.UncaughtExceptionHandler; import java.util.ArrayList; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.UUID; @@ -811,6 +813,12 @@ public class OsmandApplication extends MultiDexApplication { return localizedResources != null ? localizedResources : super.getResources(); } + public List getAllRoutingConfigs() { + List builders = new ArrayList<>(customRoutingConfigs.values()); + builders.add(0, getDefaultRoutingConfig()); + return builders; + } + public synchronized RoutingConfiguration.Builder getDefaultRoutingConfig() { return RoutingConfiguration.getDefault(); } @@ -836,6 +844,19 @@ public class OsmandApplication extends MultiDexApplication { return builder != null ? builder : getDefaultRoutingConfig(); } + public static GeneralRouter getRouter(OsmandApplication app, ApplicationMode mode) { + Builder builder = app.getRoutingConfigForMode(mode); + return getRouter(builder, mode); + } + + public static GeneralRouter getRouter(Builder builder, ApplicationMode am) { + GeneralRouter router = builder.getRouter(am.getRoutingProfile()); + if (router == null && am.getParent() != null) { + router = builder.getRouter(am.getParent().getStringKey()); + } + return router; + } + public OsmandRegions getRegions() { return regions; } diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 5cd2b87490..a14812087d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -52,7 +52,6 @@ import net.osmand.router.GeneralRouter; import net.osmand.router.GeneralRouter.GeneralRouterProfile; import net.osmand.router.GeneralRouter.RoutingParameter; import net.osmand.router.GeneralRouter.RoutingParameterType; -import net.osmand.router.RoutingConfiguration; import net.osmand.util.Algorithms; import java.util.ArrayList; @@ -315,7 +314,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { cat.addPreference(fastRoute); } else { ApplicationMode am = settings.getApplicationMode(); - GeneralRouter router = getRouter(getMyApplication(), am); + GeneralRouter router = OsmandApplication.getRouter(settings.getContext(), am); clearParameters(); if (router != null) { GeneralRouterProfile routerProfile = router.getProfile(); @@ -431,20 +430,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { reliefFactorParameters.clear(); } - public static GeneralRouter getRouter(OsmandApplication app, ApplicationMode mode) { - RoutingConfiguration.Builder builder = app.getRoutingConfigForMode(mode); - return getRouter(builder, mode); - } - - public static GeneralRouter getRouter(net.osmand.router.RoutingConfiguration.Builder builder, ApplicationMode am) { - GeneralRouter router = builder.getRouter(am.getRoutingProfile()); - if (router == null && am.getParent() != null) { - router = builder.getRouter(am.getParent().getStringKey()); - } - return router; - } - - public void updateAllSettings() { + public void updateAllSettings() { prepareRoutingPrefs(getPreferenceScreen()); reloadVoiceListPreference(getPreferenceScreen()); super.updateAllSettings(); @@ -733,7 +719,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { final OsmandApplication app = (OsmandApplication) activity.getApplication(); final OsmandSettings settings = app.getSettings(); - GeneralRouter router = getRouter(app, mode); + GeneralRouter router = OsmandApplication.getRouter(app, mode); SpeedConstants units = settings.SPEED_SYSTEM.getModeValue(mode); String speedUnits = units.toShortString(activity); final float[] ratio = new float[1]; diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index efe859624e..a815efedb4 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -163,7 +163,9 @@ public class AvoidSpecificRoads { app.getSettings().removeImpassableRoad(latLon); RouteDataObject obj = impassableRoads.remove(latLon); if (obj != null) { - RoutingConfiguration.Builder.removeImpassableRoad(obj); + for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) { + builder.removeImpassableRoad(obj); + } } } @@ -289,7 +291,9 @@ public class AvoidSpecificRoads { final LatLon oldLoc = getLocation(currentObject); app.getSettings().moveImpassableRoad(oldLoc, newLoc); impassableRoads.remove(oldLoc); - RoutingConfiguration.Builder.removeImpassableRoad(currentObject); + for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) { + builder.removeImpassableRoad(currentObject); + } addImpassableRoadInternal(object, ll, showDialog, activity, newLoc); if (callback != null) { @@ -311,7 +315,11 @@ public class AvoidSpecificRoads { boolean showDialog, @Nullable MapActivity activity, @NonNull LatLon loc) { - if (RoutingConfiguration.Builder.addImpassableRoad(object, ll)) { + boolean roadAdded = false; + for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) { + roadAdded |= builder.addImpassableRoad(object, ll); + } + if (roadAdded) { impassableRoads.put(loc, object); } else { LatLon location = getLocation(object); @@ -340,7 +348,13 @@ public class AvoidSpecificRoads { } public LatLon getLocation(RouteDataObject object) { - Location location = RoutingConfiguration.Builder.getImpassableRoadLocations().get(object.getId()); + Location location = null; + for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) { + location = builder.getImpassableRoadLocations().get(object.getId()); + if (location != null) { + break; + } + } return location == null ? null : new LatLon(location.getLatitude(), location.getLongitude()); } diff --git a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java index a54e86336c..20b76eee45 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java @@ -34,7 +34,6 @@ import net.osmand.data.FavouritePoint; import net.osmand.plus.AppInitializer; import net.osmand.plus.AppInitializer.AppInitializeListener; import net.osmand.plus.AppInitializer.InitEvents; -import net.osmand.plus.ApplicationMode; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.GPXDatabase; import net.osmand.plus.OsmandApplication; @@ -51,9 +50,7 @@ import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerHalfItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.ShortDescriptionItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; -import net.osmand.plus.profiles.AdditionalDataWrapper; import net.osmand.plus.profiles.ExportImportProfileBottomSheet; -import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.router.RoutingConfiguration; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java index 3160256a39..00434a997c 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java @@ -31,7 +31,6 @@ import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.SettingsBaseActivity; -import net.osmand.plus.activities.SettingsNavigationActivity; import net.osmand.plus.dashboard.DashboardOnMap; import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.DownloadActivityType; @@ -408,7 +407,7 @@ public class RoutingOptionsHelper { public LocalRoutingParameter getRoutingParameterInnerById(ApplicationMode am, String parameterId) { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); - GeneralRouter rm = SettingsNavigationActivity.getRouter(app, am); + GeneralRouter rm = OsmandApplication.getRouter(app, am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return null; } @@ -492,7 +491,7 @@ public class RoutingOptionsHelper { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); List list = new ArrayList(getGpxRouterParameters(am)); - GeneralRouter rm = SettingsNavigationActivity.getRouter(app, am); + GeneralRouter rm = OsmandApplication.getRouter(app, am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return list; } @@ -582,7 +581,7 @@ public class RoutingOptionsHelper { public List getAvoidRoutingPrefsForAppMode(ApplicationMode applicationMode) { List avoidParameters = new ArrayList(); - GeneralRouter router = SettingsNavigationActivity.getRouter(app, applicationMode); + GeneralRouter router = OsmandApplication.getRouter(app, applicationMode); if (router != null) { for (Map.Entry e : router.getParameters().entrySet()) { String param = e.getKey(); @@ -596,7 +595,7 @@ public class RoutingOptionsHelper { } public GeneralRouter.RoutingParameter getRoutingPrefsForAppModeById(ApplicationMode applicationMode, String parameterId) { - GeneralRouter router = SettingsNavigationActivity.getRouter(app, applicationMode); + GeneralRouter router = OsmandApplication.getRouter(app, applicationMode); GeneralRouter.RoutingParameter parameter = null; if (router != null) { diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index eec1b4ed33..11204cbad9 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -27,7 +27,6 @@ import net.osmand.plus.R; import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.Version; -import net.osmand.plus.activities.SettingsNavigationActivity; import net.osmand.plus.render.NativeOsmandLibrary; import net.osmand.router.GeneralRouter; import net.osmand.router.GeneralRouter.RoutingParameter; @@ -601,7 +600,7 @@ public class RouteProvider { router.setUseFastRecalculation(settings.USE_FAST_RECALCULATION.get()); RoutingConfiguration.Builder config = params.ctx.getRoutingConfigForMode(params.mode); - GeneralRouter generalRouter = SettingsNavigationActivity.getRouter(config, params.mode); + GeneralRouter generalRouter = OsmandApplication.getRouter(config, params.mode); if (generalRouter == null) { return applicationModeNotSupported(params); } diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 20f67f09b7..7aca4c3483 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -220,8 +220,7 @@ public class NavigationFragment extends BaseSettingsFragment { false, null)); } - collectRoutingProfilesFromConfig(context, context.getDefaultRoutingConfig(), profilesObjects); - for (RoutingConfiguration.Builder builder : context.getCustomRoutingConfigs().values()) { + for (RoutingConfiguration.Builder builder : context.getAllRoutingConfigs()) { collectRoutingProfilesFromConfig(context, builder, profilesObjects); } return profilesObjects; diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 1987bc3fb0..1d25c65b81 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -139,7 +139,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); } else { - GeneralRouter router = SettingsNavigationActivity.getRouter(app, am); + GeneralRouter router = OsmandApplication.getRouter(app, am); clearParameters(); if (router != null) { Map parameters = router.getParameters(); diff --git a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java index 155dfbd573..d2e8845a3b 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java @@ -18,7 +18,6 @@ import net.osmand.router.GeneralRouter; import java.util.Map; -import static net.osmand.plus.activities.SettingsNavigationActivity.getRouter; import static net.osmand.plus.activities.SettingsNavigationActivity.showSeekbarSettingsDialog; public class VehicleParametersFragment extends BaseSettingsFragment implements OnPreferenceChanged { @@ -42,7 +41,7 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O RouteService routeService = mode.getRouteService(); if (routeService == RouteService.OSMAND) { - GeneralRouter router = getRouter(app, mode); + GeneralRouter router = OsmandApplication.getRouter(app, mode); if (router != null) { Map parameters = router.getParameters(); From 0edc976abde1a7d397dfda870b8589f0060dce23 Mon Sep 17 00:00:00 2001 From: Nazar Date: Mon, 17 Feb 2020 14:04:20 +0200 Subject: [PATCH 059/120] Small fixes --- OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java index 8026ea7632..8fd43c49c2 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ScrollHelper.java @@ -33,12 +33,7 @@ public class ScrollHelper { public void run() { isInContinuousScrolling = true; while (hasActiveDirections()) { - app.runInUIThread(new Runnable() { - @Override - public void run() { - notifyListener(true); - } - }); + notifyListener(true); try { Thread.sleep(REFRESHING_DELAY_MS); } catch (InterruptedException e) { From f7bdb0f04af2f48a6cd7b1963d6c5cceac9383a7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 13:05:46 +0100 Subject: [PATCH 060/120] Update map utils --- .../main/java/net/osmand/osm/edit/Node.java | 8 +++++++ .../main/java/net/osmand/util/MapUtils.java | 24 ++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/edit/Node.java b/OsmAnd-java/src/main/java/net/osmand/osm/edit/Node.java index b28a177b6c..eb887f9673 100644 --- a/OsmAnd-java/src/main/java/net/osmand/osm/edit/Node.java +++ b/OsmAnd-java/src/main/java/net/osmand/osm/edit/Node.java @@ -1,5 +1,6 @@ package net.osmand.osm.edit; +import net.osmand.Location; import net.osmand.data.LatLon; import net.osmand.util.Algorithms; @@ -25,6 +26,13 @@ public class Node extends Entity implements Serializable { return new LatLon(getLatitude(), getLongitude()); } + public Location getLocation() { + Location l = new Location(""); + l.setLatitude(getLatitude()); + l.setLongitude(getLongitude()); + return l; + } + @Override public void initializeLinks(Map entities) { // nothing to initialize diff --git a/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java b/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java index b11575eaa5..bb561c4cc6 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java @@ -23,6 +23,8 @@ import static com.jwetherell.openmap.common.MoreMath.QUAD_PI_D; */ public class MapUtils { + private static final int EARTH_RADIUS_B = 6356752; + private static final int EARTH_RADIUS_A = 6378137; public static final double MIN_LATITUDE = -85.0511; public static final double MAX_LATITUDE = 85.0511; public static final double LATITUDE_TURN = 180.0; @@ -223,8 +225,8 @@ public class MapUtils { public static double getTileEllipsoidNumberY(float zoom, double latitude) { final double E2 = (double) latitude * Math.PI / 180; - final long sradiusa = 6378137; - final long sradiusb = 6356752; + final long sradiusa = EARTH_RADIUS_A; + final long sradiusb = EARTH_RADIUS_B; final double J2 = (double) Math.sqrt(sradiusa * sradiusa - sradiusb * sradiusb) / sradiusa; final double M2 = (double) Math.log((1 + Math.sin(E2)) / (1 - Math.sin(E2))) / 2 - J2 * Math.log((1 + J2 * Math.sin(E2)) / (1 - J2 * Math.sin(E2))) / 2; @@ -234,8 +236,8 @@ public class MapUtils { public static double getLatitudeFromEllipsoidTileY(float zoom, float tileNumberY) { final double MerkElipsK = 0.0000001; - final long sradiusa = 6378137; - final long sradiusb = 6356752; + final long sradiusa = EARTH_RADIUS_A; + final long sradiusb = EARTH_RADIUS_B; final double FExct = (double) Math.sqrt(sradiusa * sradiusa - sradiusb * sradiusb) / sradiusa; @@ -651,10 +653,9 @@ public class MapUtils { || (l1 != null && l2 != null && Math.abs(l1.getLatitude() - l2.getLatitude()) < 0.00001 && Math.abs(l1.getLongitude() - l2.getLongitude()) < 0.00001); } - - public static LatLon rhumbDestinationPoint(LatLon latLon, double distance, double bearing) - { - double radius = 6371e3; + + public static LatLon rhumbDestinationPoint(LatLon latLon, double distance, double bearing){ + double radius = EARTH_RADIUS_A; double d = distance / radius; // angular distance in radians double phi1 = Math.toRadians(latLon.getLatitude()); @@ -665,11 +666,12 @@ public class MapUtils { double phi2 = phi1 + deltaPhi; // check for some daft bugger going past the pole, normalise latitude if so - //if (ABS(phi2) > M_PI_2) - // phi2 = phi2>0 ? M_PI-phi2 : -M_PI-phi2; + // if (ABS(phi2) > M_PI_2) + // phi2 = phi2>0 ? M_PI-phi2 : -M_PI-phi2; double deltaPsi = Math.log(Math.tan(phi2 / 2 + QUAD_PI_D) / Math.tan(phi1 / 2 + QUAD_PI_D)); - double q = Math.abs(deltaPsi) > 10e-12 ? deltaPhi / deltaPsi : Math.cos(phi1); // E-W course becomes incorrect with 0/0 + double q = Math.abs(deltaPsi) > 10e-12 ? deltaPhi / deltaPsi : Math.cos(phi1); // E-W course becomes incorrect + // with 0/0 double deltalambda = d * Math.sin(theta) / q; double lambda2 = lambda1 + deltalambda; From cd5d2ad16e8dde4171dce9f30bd7967d0a5b4190 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Mon, 17 Feb 2020 14:17:43 +0200 Subject: [PATCH 061/120] work in progress - routing --- .../osmand/plus/routing/RouteProvider.java | 64 +++++++++++++++---- .../src/net/osmand/plus/views/RouteLayer.java | 2 +- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index b5e07bc9a4..219f8e657b 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -9,9 +9,12 @@ import android.util.Base64; import net.osmand.Location; import net.osmand.PlatformUtil; import net.osmand.binary.BinaryMapIndexReader; +import net.osmand.data.DataTileManager; import net.osmand.data.LatLon; import net.osmand.data.LocationPoint; import net.osmand.data.WptLocationPoint; +import net.osmand.osm.edit.Node; +import net.osmand.osm.edit.Way; import net.osmand.osm.io.NetworkUtils; import net.osmand.plus.ApplicationMode; import net.osmand.GPXUtilities; @@ -75,6 +78,7 @@ public class RouteProvider { private static final org.apache.commons.logging.Log log = PlatformUtil.getLog(RouteProvider.class); private static final String OSMAND_ROUTER = "OsmAndRouter"; private static final int MIN_DISTANCE_FOR_INSERTING_ROUTE_SEGMENT = 60; + private static final int MIN_STRAIGHT_DIST = 50000; public enum RouteService { OSMAND("OsmAnd (offline)"), @@ -1241,24 +1245,26 @@ public class RouteProvider { double[] lons = new double[] { params.start.getLongitude(), params.end.getLongitude() }; List intermediates = params.intermediates; List dots = new ArrayList(); - //writing start location + List segment; Location location = new Location(String.valueOf("start")); location.setLatitude(lats[0]); location.setLongitude(lons[0]); + dots.add(location); //adding intermediate dots if they exists - if (intermediates != null){ - for(int i =0; i calcStraightRoute(LatLon startRoute, LatLon endRoute) { + List ways = new ArrayList<>(); + { + Way w = new Way(1); + w.addNode(new net.osmand.osm.edit.Node(startRoute.getLatitude(), startRoute.getLongitude(), -1)); + addStraightLine(w, startRoute, endRoute); + + ways.add(w); + } + List points = new ArrayList<>(); + for (Way w : ways) { + List nodes = w.getNodes(); + for (int n = 0; n < nodes.size(); n++) { + Location ll = new Location(""); + ll.setLatitude(nodes.get(n).getLatitude()); + ll.setLongitude(nodes.get(n).getLongitude()); + points.add(ll); + } + } + return points; + } + + private void addStraightLine(Way w, LatLon s1, LatLon s2) { + if(MapUtils.getDistance(s1, s2) > MIN_STRAIGHT_DIST) { + double mlat = (s1.getLatitude() + s2.getLatitude()) / 2; + double mlon = (s1.getLongitude() + s2.getLongitude()) / 2; + LatLon m = new LatLon(mlat, mlon); + addStraightLine(w, s1, m); + addStraightLine(w, m, s2); + } else { + w.addNode(new net.osmand.osm.edit.Node(s2.getLatitude(), s2.getLongitude(), -1)); + } + } } diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 53100e6f8f..fa427d61b7 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -1117,7 +1117,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont Location pointToReturn = null; if (route != null && currentRoute > 0 && route.getRouteRecalcDistance() > 0) { // Location currentLoc = helper.getApplication().getLocationProvider().getLastKnownLocation(); -// final Location from = routeGeometry.locations.get(currentRoute - 1); +// final Location from = routeGeometry.locations.get(currentRoute - 1);o // final Location to = routeGeometry.locations.get(currentRoute); // final LatLon projection = MapUtils.getProjection(currentLoc.getLatitude(), // currentLoc.getLongitude(), from.getLatitude(), from.getLongitude(), From 80906be53b73baab349d8cac8b22ddfcce9fb77a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 17 Feb 2020 14:20:19 +0200 Subject: [PATCH 062/120] Add ability to disable notifications update --- .../net/osmand/plus/notifications/GpxNotification.java | 5 +++++ .../osmand/plus/notifications/NavigationNotification.java | 7 ++++++- .../net/osmand/plus/notifications/OsmandNotification.java | 8 ++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java index c56b92027b..bd2c9df427 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java @@ -103,6 +103,11 @@ public class GpxNotification extends OsmandNotification { return new Intent(app, MapActivity.class); } + @Override + public boolean isUpdateDisabled() { + return app.getSettings().MAP_ACTIVITY_ENABLED.get() && !app.getSettings().SHOW_TRIP_REC_NOTIFICATION.get(); + } + @Override public void onNotificationDismissed() { if (!wasNoDataDismissed) { diff --git a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java index c75aadd412..47e7849316 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java @@ -114,6 +114,11 @@ public class NavigationNotification extends OsmandNotification { || (routingHelper.isRoutePlanningMode() && routingHelper.isPauseNavigation()); } + @Override + public boolean isUpdateDisabled() { + return app.getSettings().MAP_ACTIVITY_ENABLED.get() && !app.getSettings().SHOW_NAVIGATION_NOTIFICATION.get(); + } + @Override public Intent getContentIntent() { return new Intent(app, MapActivity.class); @@ -121,7 +126,7 @@ public class NavigationNotification extends OsmandNotification { @Override public Builder buildNotification(boolean wearable) { - if (!isEnabled() || !app.getSettings().SHOW_NAVIGATION_NOTIFICATION.get()) { + if (!isEnabled()) { return null; } NavigationService service = app.getNavigationService(); diff --git a/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java b/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java index 30ed6236ed..6e24cc370c 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/OsmandNotification.java @@ -11,7 +11,6 @@ import android.support.v4.app.NotificationManagerCompat; import net.osmand.plus.NotificationHelper; import net.osmand.plus.OsmandApplication; -import net.osmand.plus.activities.MapActivity; public abstract class OsmandNotification { @@ -105,6 +104,8 @@ public abstract class OsmandNotification { public abstract boolean isEnabled(); + public abstract boolean isUpdateDisabled(); + public abstract Intent getContentIntent(); public void setupNotification(Notification notification) { @@ -125,7 +126,7 @@ public abstract class OsmandNotification { NotificationManagerCompat notificationManager = NotificationManagerCompat.from(app); if (isEnabled()) { Builder notificationBuilder = buildNotification(false); - if (notificationBuilder != null) { + if (notificationBuilder != null && !isUpdateDisabled()) { Notification notification = getNotification(notificationBuilder, false); setupNotification(notification); notificationManager.notify(top ? TOP_NOTIFICATION_SERVICE_ID : getOsmandNotificationId(), notification); @@ -141,6 +142,9 @@ public abstract class OsmandNotification { if (isEnabled()) { Builder notificationBuilder = buildNotification(false); if (notificationBuilder != null) { + if (isUpdateDisabled()) { + return false; + } Notification notification = getNotification(notificationBuilder, true); setupNotification(notification); if (top) { From 86bee149396f643041fb62bbdcf2c5e9b632c59a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 17 Feb 2020 14:22:04 +0200 Subject: [PATCH 063/120] Remove unnecessary check for gpx notification --- .../plus/notifications/DownloadNotification.java | 5 +++++ .../plus/notifications/ErrorNotification.java | 5 +++++ .../plus/notifications/GpxNotification.java | 16 ---------------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java b/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java index 5b1e7109c4..92091f651b 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/DownloadNotification.java @@ -53,6 +53,11 @@ public class DownloadNotification extends OsmandNotification { return new Intent(app, DownloadActivity.class); } + @Override + public boolean isUpdateDisabled() { + return false; + } + @Override public NotificationCompat.Builder buildNotification(boolean wearable) { icon = android.R.drawable.stat_sys_download; diff --git a/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java b/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java index af9a3841c9..a31d77851b 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/ErrorNotification.java @@ -48,6 +48,11 @@ public class ErrorNotification extends OsmandNotification { return new Intent(app, MapActivity.class); } + @Override + public boolean isUpdateDisabled() { + return false; + } + @Override public NotificationCompat.Builder buildNotification(boolean wearable) { String notificationTitle; diff --git a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java index bd2c9df427..e2e662d9f1 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java @@ -27,9 +27,6 @@ public class GpxNotification extends OsmandNotification { public final static String OSMAND_STOP_GPX_SERVICE_ACTION = "OSMAND_STOP_GPX_SERVICE_ACTION"; public final static String GROUP_NAME = "GPX"; - private boolean wasNoDataDismissed; - private boolean lastBuiltNoData; - public GpxNotification(OsmandApplication app) { super(app, GROUP_NAME); } @@ -108,13 +105,6 @@ public class GpxNotification extends OsmandNotification { return app.getSettings().MAP_ACTIVITY_ENABLED.get() && !app.getSettings().SHOW_TRIP_REC_NOTIFICATION.get(); } - @Override - public void onNotificationDismissed() { - if (!wasNoDataDismissed) { - wasNoDataDismissed = lastBuiltNoData; - } - } - @Override public Builder buildNotification(boolean wearable) { if (!isEnabled()) { @@ -127,7 +117,6 @@ public class GpxNotification extends OsmandNotification { boolean isGpxRecording = app.getSavingTrackHelper().getIsRecording(); float recordedDistance = app.getSavingTrackHelper().getDistance(); ongoing = true; - lastBuiltNoData = false; if (isGpxRecording) { color = app.getResources().getColor(R.color.osmand_orange); notificationTitle = app.getString(R.string.shared_string_trip) + " • " @@ -144,15 +133,10 @@ public class GpxNotification extends OsmandNotification { ongoing = false; notificationTitle = app.getString(R.string.shared_string_trip_recording); notificationText = app.getString(R.string.gpx_logging_no_data); - lastBuiltNoData = true; } } notificationText = notificationText + " (" + Integer.toString(app.getSavingTrackHelper().getTrkPoints()) + ")"; - if ((wasNoDataDismissed || !app.getSettings().SHOW_TRIP_REC_NOTIFICATION.get()) && !ongoing) { - return null; - } - final Builder notificationBuilder = createBuilder(wearable) .setContentTitle(notificationTitle) .setStyle(new BigTextStyle().bigText(notificationText)); From 9b6d6e3f5b738dc8379e63bf1781e09b814a4995 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Mon, 17 Feb 2020 16:12:11 +0300 Subject: [PATCH 064/120] Revert "Added default widget action item to av settings fragment" This reverts commit 77e316f8e66d3f0fcf8d6a5591a9dd98b21134f1. --- OsmAnd/res/xml/multimedia_notes.xml | 7 ----- .../audionotes/MultimediaNotesFragment.java | 29 ------------------- 2 files changed, 36 deletions(-) diff --git a/OsmAnd/res/xml/multimedia_notes.xml b/OsmAnd/res/xml/multimedia_notes.xml index a3c8569758..017768ef4d 100644 --- a/OsmAnd/res/xml/multimedia_notes.xml +++ b/OsmAnd/res/xml/multimedia_notes.xml @@ -3,13 +3,6 @@ xmlns:tools="http://schemas.android.com/tools" android:title="@string/audionotes_plugin_name"> - - items = new ArrayList(); - List itemsValues = new ArrayList(); - items.add(getString(R.string.av_def_action_choose)); - itemsValues.add(AV_DEFAULT_ACTION_CHOOSE); - items.add(getString(R.string.av_def_action_audio)); - itemsValues.add(AV_DEFAULT_ACTION_AUDIO); - items.add(getString(R.string.av_def_action_video)); - itemsValues.add(AV_DEFAULT_ACTION_VIDEO); - items.add(getString(R.string.av_def_action_picture)); - itemsValues.add(AV_DEFAULT_ACTION_TAKEPICTURE); - - String[] entries = items.toArray(new String[0]); - Integer[] entryValues = itemsValues.toArray(new Integer[0]); - - defaultWidgetActions.setEntries(entries); - defaultWidgetActions.setEntryValues(entryValues); - } - private void setupCameraPhotoPrefs(AudioVideoNotesPlugin plugin) { Camera cam = openCamera(); setupCameraPermissionPref(cam); From 052270132fe8dc5290d8064c867e5a5b129d6f62 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 17 Feb 2020 15:17:54 +0200 Subject: [PATCH 065/120] Make getRouter not static --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 6 +++--- .../plus/activities/SettingsNavigationActivity.java | 4 ++-- .../plus/routepreparationmenu/RoutingOptionsHelper.java | 8 ++++---- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 2 +- .../net/osmand/plus/settings/RouteParametersFragment.java | 2 +- .../osmand/plus/settings/VehicleParametersFragment.java | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index af2556c064..80fe77f1bd 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -844,12 +844,12 @@ public class OsmandApplication extends MultiDexApplication { return builder != null ? builder : getDefaultRoutingConfig(); } - public static GeneralRouter getRouter(OsmandApplication app, ApplicationMode mode) { - Builder builder = app.getRoutingConfigForMode(mode); + public GeneralRouter getRouter(ApplicationMode mode) { + Builder builder = getRoutingConfigForMode(mode); return getRouter(builder, mode); } - public static GeneralRouter getRouter(Builder builder, ApplicationMode am) { + public GeneralRouter getRouter(Builder builder, ApplicationMode am) { GeneralRouter router = builder.getRouter(am.getRoutingProfile()); if (router == null && am.getParent() != null) { router = builder.getRouter(am.getParent().getStringKey()); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index a14812087d..f17128fba4 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -314,7 +314,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { cat.addPreference(fastRoute); } else { ApplicationMode am = settings.getApplicationMode(); - GeneralRouter router = OsmandApplication.getRouter(settings.getContext(), am); + GeneralRouter router = settings.getContext().getRouter(am); clearParameters(); if (router != null) { GeneralRouterProfile routerProfile = router.getProfile(); @@ -719,7 +719,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { final OsmandApplication app = (OsmandApplication) activity.getApplication(); final OsmandSettings settings = app.getSettings(); - GeneralRouter router = OsmandApplication.getRouter(app, mode); + GeneralRouter router = app.getRouter(mode); SpeedConstants units = settings.SPEED_SYSTEM.getModeValue(mode); String speedUnits = units.toShortString(activity); final float[] ratio = new float[1]; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java index 00434a997c..50385b3c1c 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java @@ -407,7 +407,7 @@ public class RoutingOptionsHelper { public LocalRoutingParameter getRoutingParameterInnerById(ApplicationMode am, String parameterId) { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); - GeneralRouter rm = OsmandApplication.getRouter(app, am); + GeneralRouter rm = app.getRouter(am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return null; } @@ -491,7 +491,7 @@ public class RoutingOptionsHelper { RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute(); List list = new ArrayList(getGpxRouterParameters(am)); - GeneralRouter rm = OsmandApplication.getRouter(app, am); + GeneralRouter rm = app.getRouter(am); if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) { return list; } @@ -581,7 +581,7 @@ public class RoutingOptionsHelper { public List getAvoidRoutingPrefsForAppMode(ApplicationMode applicationMode) { List avoidParameters = new ArrayList(); - GeneralRouter router = OsmandApplication.getRouter(app, applicationMode); + GeneralRouter router = app.getRouter(applicationMode); if (router != null) { for (Map.Entry e : router.getParameters().entrySet()) { String param = e.getKey(); @@ -595,7 +595,7 @@ public class RoutingOptionsHelper { } public GeneralRouter.RoutingParameter getRoutingPrefsForAppModeById(ApplicationMode applicationMode, String parameterId) { - GeneralRouter router = OsmandApplication.getRouter(app, applicationMode); + GeneralRouter router = app.getRouter(applicationMode); GeneralRouter.RoutingParameter parameter = null; if (router != null) { diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 11204cbad9..f17d4a1a9d 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -600,7 +600,7 @@ public class RouteProvider { router.setUseFastRecalculation(settings.USE_FAST_RECALCULATION.get()); RoutingConfiguration.Builder config = params.ctx.getRoutingConfigForMode(params.mode); - GeneralRouter generalRouter = OsmandApplication.getRouter(config, params.mode); + GeneralRouter generalRouter = params.ctx.getRouter(config, params.mode); if (generalRouter == null) { return applicationModeNotSupported(params); } diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java index 1d25c65b81..829667e63e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java @@ -139,7 +139,7 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP if (am.getRouteService() != RouteProvider.RouteService.OSMAND) { screen.addPreference(fastRoute); } else { - GeneralRouter router = OsmandApplication.getRouter(app, am); + GeneralRouter router = app.getRouter(am); clearParameters(); if (router != null) { Map parameters = router.getParameters(); diff --git a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java index d2e8845a3b..52905b90c7 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java @@ -41,7 +41,7 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O RouteService routeService = mode.getRouteService(); if (routeService == RouteService.OSMAND) { - GeneralRouter router = OsmandApplication.getRouter(app, mode); + GeneralRouter router = app.getRouter(mode); if (router != null) { Map parameters = router.getParameters(); From 06b6ca80b0a9d931168b442a7306969861b992ce Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 17 Feb 2020 15:25:00 +0200 Subject: [PATCH 066/120] Remove unnecessary changes --- .../plus/notifications/GpxNotification.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java index e2e662d9f1..647f8e0aec 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java @@ -27,6 +27,9 @@ public class GpxNotification extends OsmandNotification { public final static String OSMAND_STOP_GPX_SERVICE_ACTION = "OSMAND_STOP_GPX_SERVICE_ACTION"; public final static String GROUP_NAME = "GPX"; + private boolean wasNoDataDismissed; + private boolean lastBuiltNoData; + public GpxNotification(OsmandApplication app) { super(app, GROUP_NAME); } @@ -105,6 +108,13 @@ public class GpxNotification extends OsmandNotification { return app.getSettings().MAP_ACTIVITY_ENABLED.get() && !app.getSettings().SHOW_TRIP_REC_NOTIFICATION.get(); } + @Override + public void onNotificationDismissed() { + if (!wasNoDataDismissed) { + wasNoDataDismissed = lastBuiltNoData; + } + } + @Override public Builder buildNotification(boolean wearable) { if (!isEnabled()) { @@ -117,6 +127,7 @@ public class GpxNotification extends OsmandNotification { boolean isGpxRecording = app.getSavingTrackHelper().getIsRecording(); float recordedDistance = app.getSavingTrackHelper().getDistance(); ongoing = true; + lastBuiltNoData = false; if (isGpxRecording) { color = app.getResources().getColor(R.color.osmand_orange); notificationTitle = app.getString(R.string.shared_string_trip) + " • " @@ -133,10 +144,15 @@ public class GpxNotification extends OsmandNotification { ongoing = false; notificationTitle = app.getString(R.string.shared_string_trip_recording); notificationText = app.getString(R.string.gpx_logging_no_data); + lastBuiltNoData = true; } } notificationText = notificationText + " (" + Integer.toString(app.getSavingTrackHelper().getTrkPoints()) + ")"; + if ((wasNoDataDismissed || !app.getSettings().SHOW_TRIP_REC_NOTIFICATION.get()) && !ongoing) { + return null; + } + final Builder notificationBuilder = createBuilder(wearable) .setContentTitle(notificationTitle) .setStyle(new BigTextStyle().bigText(notificationText)); From 1c7c25471882e420056eb6d8002d712354ce21c7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 17:06:04 +0100 Subject: [PATCH 067/120] Fix routing helper to support points --- .../main/java/net/osmand/util/MapUtils.java | 18 +++++- .../plus/routing/RouteCalculationParams.java | 2 - .../plus/routing/RouteCalculationResult.java | 55 +++++++++++++++---- .../osmand/plus/routing/RouteProvider.java | 1 - .../osmand/plus/routing/RoutingHelper.java | 33 ++++++++++- 5 files changed, 92 insertions(+), 17 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java b/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java index bb561c4cc6..b1c4c54566 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java @@ -57,7 +57,23 @@ public class MapUtils { // Scalar multiplication between (AB, AC) return (xB - xA) * (xC - xA) + (yB - yA) * (yC - yA); } - + + public static Location calculateMidPoint(Location s1, Location s2) { + double lat1 = s1.getLatitude() / 180 * Math.PI; + double lon1 = s1.getLongitude() / 180 * Math.PI; + double lat2 = s2.getLatitude() / 180 * Math.PI; + double lon2 = s2.getLongitude() / 180 * Math.PI; + double Bx = Math.cos(lat2) * Math.cos(lon2 - lon1); + double By = Math.cos(lat2) * Math.sin(lon2 - lon1); + double latMid = Math.atan2(Math.sin(lat1) + Math.sin(lat2), + Math.sqrt((Math.cos(lat1) + Bx) * (Math.cos(lat1) + Bx) + By * By)); + double lonMid = lon1 + Math.atan2(By, Math.cos(lat1) + Bx); + Location r = new Location(""); + r.setLatitude(MapUtils.checkLatitude(latMid * 180 / Math.PI)); + r.setLongitude(MapUtils.checkLongitude(lonMid * 180 / Math.PI)); + return r; + } + public static LatLon calculateMidPoint(LatLon s1, LatLon s2) { double lat1 = s1.getLatitude() / 180 * Math.PI; double lon1 = s1.getLongitude() / 180 * Math.PI; diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java index e53158f1a2..bed0858ab5 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java @@ -20,7 +20,6 @@ public class RouteCalculationParams { public Location currentLocation; public OsmandApplication ctx; - public RoutingContext cachedRoutingContext; public ApplicationMode mode; public GPXRouteParams gpxRoute; public RouteCalculationResult previousToRecalculate; @@ -35,7 +34,6 @@ public class RouteCalculationParams { public RouteCalculationProgressCallback calculationProgressCallback; public RouteCalculationResultListener resultListener; - public boolean showOriginalRoute; public float routeRecalculationDistance; public interface RouteCalculationResultListener { diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 11741dd54a..f7f2fc2570 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -2,6 +2,7 @@ package net.osmand.plus.routing; import android.content.Context; import android.support.annotation.Nullable; +import android.system.Os; import net.osmand.Location; import net.osmand.PlatformUtil; @@ -55,6 +56,12 @@ public class RouteCalculationResult { protected List cacheAgreggatedDirections; protected List locationPoints = new ArrayList(); + // parmas + protected final ApplicationMode appMode; + protected final RouteProvider.RouteService routeService; + protected final double routeRecalcDistance; + protected final double routeVisibleAngle = 30; + // Note always currentRoute > get(currentDirectionInfo).routeOffset, // but currentRoute <= get(currentDirectionInfo+1).routeOffset protected int currentDirectionInfo = 0; @@ -62,10 +69,11 @@ public class RouteCalculationResult { protected int nextIntermediate = 0; protected int currentWaypointGPX = 0; protected int lastWaypointGPX = 0; - protected ApplicationMode appMode; + protected int currentStraightAngleRoute = -1; + protected Location currentStraightAnglePoint = null; + + - protected boolean showOriginalRoute = false; - protected double routeRecalcDistance = 0.d; public RouteCalculationResult(String errorMessage) { this.errorMessage = errorMessage; @@ -79,6 +87,9 @@ public class RouteCalculationResult { this.listDistance = new int[0]; this.directions = new ArrayList(); this.alarmInfo = new ArrayList(); + this.routeService = null; + this.appMode = null; + this.routeRecalcDistance = 0; } public RouteCalculationResult(List list, List directions, RouteCalculationParams params, List waypoints, boolean addMissingTurns) { @@ -112,11 +123,11 @@ public class RouteCalculationResult { calculateIntermediateIndexes(params.ctx, this.locations, params.intermediates, localDirections, this.intermediatePoints); this.directions = Collections.unmodifiableList(localDirections); updateDirectionsTime(this.directions, this.listDistance); - - this.showOriginalRoute = params.showOriginalRoute; - - if (params.routeRecalculationDistance != 0.f) { - this.routeRecalcDistance = params.routeRecalculationDistance; + this.routeService = params.mode.getRouteService(); + if(params.ctx != null) { + this.routeRecalcDistance = params.ctx.getSettings().ROUTE_RECALCULATION_DISTANCE.getModeValue(params.mode); + } else { + this.routeRecalcDistance = 0; } } @@ -143,10 +154,12 @@ public class RouteCalculationResult { calculateIntermediateIndexes(ctx, this.locations, intermediates, computeDirections, this.intermediatePoints); updateListDistanceTime(this.listDistance, this.locations); this.appMode = mode; + this.routeService = mode.getRouteService(); this.directions = Collections.unmodifiableList(computeDirections); updateDirectionsTime(this.directions, this.listDistance); this.alarmInfo = Collections.unmodifiableList(alarms); + this.routeRecalcDistance = ctx.getSettings().ROUTE_RECALCULATION_DISTANCE.getModeValue(mode); } public ApplicationMode getAppMode() { @@ -242,6 +255,14 @@ public class RouteCalculationResult { return routeRecalcDistance; } + public RouteProvider.RouteService getRouteService() { + return routeService; + } + + public double getRouteVisibleAngle() { + return routeVisibleAngle; + } + public List getOriginalRoute() { if (segments.size() == 0) { return null; @@ -1210,7 +1231,20 @@ public class RouteCalculationResult { private int getListDistance(int index) { return listDistance.length > index ? listDistance[index] : 0; } - + + public int getCurrentStraightAngleRoute() { + return currentStraightAngleRoute > currentRoute ? currentStraightAngleRoute : currentRoute; + } + + public Location getCurrentStraightAnglePoint() { + return currentStraightAnglePoint; + } + + public void updateNextVisiblePoint(int nextPoint, Location mp) { + currentStraightAngleRoute = nextPoint; + currentStraightAnglePoint = mp; + } + public static class NextDirectionInfo { public RouteDirectionInfo directionInfo; public int distanceTo; @@ -1220,7 +1254,4 @@ public class RouteCalculationResult { private int directionInfoInd; } - public boolean isShowOriginalRoute() { - return showOriginalRoute; - } } diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index fc84e4a1ee..861d0d36af 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -1270,7 +1270,6 @@ public class RouteProvider { } 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() }; List intermediates = params.intermediates; diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index e8d98e626a..532c5161f1 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -43,7 +43,6 @@ public class RoutingHelper { private static final float POSITION_TOLERANCE = 60; private static final int CACHE_RADIUS = 100000; public static final float ALLOWED_DEVIATION = 2; - public static final double ANGLE_TO_DECLINE = 15; private List> listeners = new LinkedList<>(); private List> updateListeners = new LinkedList<>(); @@ -462,6 +461,7 @@ public class RoutingHelper { if (allowableDeviation == 0) { allowableDeviation = getDefaultAllowedDeviation(settings, route.getAppMode(), posTolerance); } + // 2. Analyze if we need to recalculate route // >100m off current route (sideways) or parameter (for Straight line) if (currentRoute > 0 && allowableDeviation > 0) { @@ -698,6 +698,37 @@ public class RoutingHelper { // targets.clearPointToNavigate(false); return true; } + } + + // 4. update angle point + if (route.getRouteVisibleAngle() > 0) { + // proceed to the next point with min acceptable bearing + double ANGLE_TO_DECLINE = route.getRouteVisibleAngle(); + int nextPoint = route.currentRoute; + for (; nextPoint < routeNodes.size() - 1; nextPoint++) { + float bearingTo = currentLocation.bearingTo(routeNodes.get(nextPoint)); + float bearingTo2 = currentLocation.bearingTo(routeNodes.get(nextPoint + 1)); + if (Math.abs(MapUtils.degreesDiff(bearingTo2, bearingTo)) <= ANGLE_TO_DECLINE) { + break; + } + } + + if(nextPoint > 0) { + float bearingTo = currentLocation.bearingTo(routeNodes.get(nextPoint)); + Location mp = MapUtils.calculateMidPoint(routeNodes.get(nextPoint - 1), routeNodes.get(nextPoint)); + boolean found = false; + while (mp.distanceTo(routeNodes.get(nextPoint)) > 100) { + float bearingMid = currentLocation.bearingTo(mp); + if (Math.abs(MapUtils.degreesDiff(bearingMid, bearingTo)) <= ANGLE_TO_DECLINE) { + route.updateNextVisiblePoint(nextPoint, mp); + found = true; + break; + } + } + if(!found) { + route.updateNextVisiblePoint(nextPoint, null); + } + } } return false; From 9cfdceb8501d0a0c5e5b5fbf952a6b4eb81ee513 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 17:17:33 +0100 Subject: [PATCH 068/120] Fix straight line routing --- .../src/main/java/net/osmand/Location.java | 6 + .../osmand/plus/routing/RouteProvider.java | 166 ++---------------- 2 files changed, 25 insertions(+), 147 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/Location.java b/OsmAnd-java/src/main/java/net/osmand/Location.java index 615e96f0a7..35fb969aad 100644 --- a/OsmAnd-java/src/main/java/net/osmand/Location.java +++ b/OsmAnd-java/src/main/java/net/osmand/Location.java @@ -67,6 +67,12 @@ public class Location { mProvider = provider; } + public Location(String provider, double lat, double lon) { + mProvider = provider; + setLatitude(lat); + setLongitude(lon); + } + /** * Constructs a new Location object that is a copy of the given * location. diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 861d0d36af..d8cd72828e 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -63,6 +63,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; @@ -322,10 +323,9 @@ public class RouteProvider { // res = findORSRoute(params); // } else if (params.type == RouteService.OSRM) { // res = findOSRMRoute(params); - } else if (params.mode.getRouteService() == RouteService.STRAIGHT) { + } else if (params.mode.getRouteService() == RouteService.STRAIGHT || + params.mode.getRouteService() == RouteService.DIRECT_TO) { res = findStraightRoute(params); - } else if (params.mode.getRouteService() == RouteService.DIRECT_TO) { - res = findDirectTo(params); } else { res = new RouteCalculationResult("Selected route service is not available"); } @@ -1241,157 +1241,29 @@ public class RouteProvider { } private RouteCalculationResult findStraightRoute(RouteCalculationParams params) { - double[] lats = new double[] { params.start.getLatitude(), params.end.getLatitude() }; - double[] lons = new double[] { params.start.getLongitude(), params.end.getLongitude() }; Location currentLocation = params.currentLocation; - List intermediates = params.intermediates; - List dots = new ArrayList(); - List segment; - Location location = new Location(String.valueOf("start")); - location.setLatitude(lats[0]); - location.setLongitude(lons[0]); - dots.add(location); - //adding intermediate dots if they exists, TODO: need to integrate with back-to-route mechanics - if (!Algorithms.isEmpty(intermediates)) { - for (int i = 0; i < intermediates.size(); i++) { - if (i == 0) { - segment = calcStraightRoute(new LatLon(lats[0], lons[0]), intermediates.get(0), null); - } else { - segment = calcStraightRoute(intermediates.get(i-1), intermediates.get(i), null); - } - dots.addAll(segment.subList(0, segment.size()-1)); + LinkedList points = new LinkedList<>(); + List segments = new ArrayList<>(); + points.add(params.start); + if(params.intermediates != null) { + for (LatLon l : params.intermediates) { + points.add(new Location("", l.getLatitude(), l.getLongitude())); } } - segment = calcStraightRoute(new LatLon(dots.get(dots.size()-1).getLatitude(), dots.get(dots.size()-1).getLongitude()), - new LatLon(lats[1], lons[1]), null); - dots.addAll(segment.subList(0, segment.size()-1)); - - return new RouteCalculationResult(dots, null, params, null, true); - } - - private RouteCalculationResult findDirectTo(RouteCalculationParams params) { - double[] lats = new double[] { params.start.getLatitude(), params.end.getLatitude() }; - double[] lons = new double[] { params.start.getLongitude(), params.end.getLongitude() }; - List intermediates = params.intermediates; - List dots = new ArrayList(); - //writing start location - Location location = new Location(String.valueOf("start")); - location.setLatitude(lats[0]); - location.setLongitude(lons[0]); - //adding intermediate dots if they exists - if (intermediates != null){ - for(int i =0; i calcStraightRoute(LatLon startRoute, LatLon endRoute, Location currentLocation) { - List ways = new ArrayList<>(); - { - Way w = new Way(1); - w.addNode(new net.osmand.osm.edit.Node(startRoute.getLatitude(), startRoute.getLongitude(), -1)); - addStraightLine(w, startRoute, endRoute); - - if (currentLocation == null) { - ways.add(w); + Location lastAdded = points.poll(); + segments.add(lastAdded); + while(!points.isEmpty()) { + Location pl = points.peek(); + if (lastAdded.distanceTo(pl) < MIN_STRAIGHT_DIST) { + lastAdded = points.poll(); + segments.add(lastAdded); } else { - calcRouteToPointOfReturn(ways, w, null); - } - - } - - List points = new ArrayList<>(); - for (Way w : ways) { - List nodes = w.getNodes(); - for (int n = 0; n < nodes.size(); n++) { - Location ll = new Location(""); - ll.setLatitude(nodes.get(n).getLatitude()); - ll.setLongitude(nodes.get(n).getLongitude()); - points.add(ll); + Location mp = MapUtils.calculateMidPoint(lastAdded, pl); + segments.add(0, mp); } } - return points; + return new RouteCalculationResult(segments, null, params, null, false); } - private void calcRouteToPointOfReturn(List ways, Way w, Location currentLocation) { - if (currentLocation != null) { - double minDist = w.getFirstNode().getLocation().distanceTo(currentLocation); - int minInd = 0; - LatLon prev = null; - // search closest point and save prev - for (int ind = 1; ind < w.getNodes().size(); ind++) { - float dt = w.getNodes().get(ind).getLocation().distanceTo(currentLocation); - if(dt < minDist) { - minDist = dt; - minInd = ind; - prev = w.getNodes().get(ind - 1).getLatLon(); - } - } - while(minInd > 0) { - w.removeNodeByIndex(0); - minInd --; - } - // proceed to the next point with min acceptable bearing - for (; w.getNodes().size() > 1; ) { - Node s = w.getFirstNode(); - Node n = w.getNodes().get(1); - float bearingTo = currentLocation.bearingTo(s.getLocation()); - float bearingTo2 = currentLocation.bearingTo(n.getLocation()); - if(Math.abs(MapUtils.degreesDiff(bearingTo2, bearingTo)) > RoutingHelper.ANGLE_TO_DECLINE) { - w.removeNodeByIndex(0); - prev = s.getLatLon(); - } else { - break; - } - } - if(prev != null) { - LatLon f = w.getFirstNode().getLatLon(); - float bearingTo = currentLocation.bearingTo(w.getFirstNode().getLocation()); - LatLon mp = MapUtils.calculateMidPoint(prev, f); - while (MapUtils.getDistance(mp, f) > 100) { - Location l = new Location(""); - l.setLatitude(mp.getLatitude()); - l.setLongitude(mp.getLongitude()); - float bearingMid = currentLocation.bearingTo(l); - if (Math.abs(MapUtils.degreesDiff(bearingMid, bearingTo)) < RoutingHelper.ANGLE_TO_DECLINE) { - prev = mp; - w.addNode(new Node(mp.getLatitude(), mp.getLongitude(), -1l), 0); - break; - } - mp = MapUtils.calculateMidPoint(mp, f); - } - } - - Way wr = new Way(2); - wr.addNode(new net.osmand.osm.edit.Node(currentLocation.getLatitude(),currentLocation.getLongitude(), -1l), 0); - addStraightLine(wr, new LatLon(currentLocation.getLatitude(), currentLocation.getLongitude()), w.getNodes().get(0).getLatLon()); - for(int i = 1; i < w.getNodes().size(); i++) { - wr.addNode(w.getNodes().get(i)); - } - ways.add(wr); - } - } - - private void addStraightLine(Way w, LatLon s1, LatLon s2) { - if(MapUtils.getDistance(s1, s2) > MIN_STRAIGHT_DIST) { - double mlat = (s1.getLatitude() + s2.getLatitude()) / 2; - double mlon = (s1.getLongitude() + s2.getLongitude()) / 2; - LatLon m = new LatLon(mlat, mlon); - addStraightLine(w, s1, m); - addStraightLine(w, m, s2); - } else { - w.addNode(new net.osmand.osm.edit.Node(s2.getLatitude(), s2.getLongitude(), -1)); - } - } } From 8cf98181da9f60b4cea43a408d48006a2ce58fa1 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Mon, 17 Feb 2020 19:22:35 +0300 Subject: [PATCH 069/120] Added AV widget customization to configure screen --- OsmAnd/res/menu/widget_visibility_menu.xml | 3 +- OsmAnd/res/values/ids.xml | 5 + .../audionotes/AudioVideoNotesPlugin.java | 179 ++++++++++++++---- 3 files changed, 147 insertions(+), 40 deletions(-) diff --git a/OsmAnd/res/menu/widget_visibility_menu.xml b/OsmAnd/res/menu/widget_visibility_menu.xml index ee110585a9..c81c3b4018 100644 --- a/OsmAnd/res/menu/widget_visibility_menu.xml +++ b/OsmAnd/res/menu/widget_visibility_menu.xml @@ -10,7 +10,8 @@ + android:checkableBehavior="none" + android:menuCategory="container"> + + + + + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index 4b08add243..f957ddb0e8 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -65,7 +65,9 @@ import net.osmand.plus.monitoring.OsmandMonitoringPlugin; import net.osmand.plus.myplaces.FavoritesActivity; import net.osmand.plus.settings.BaseSettingsFragment; import net.osmand.plus.views.MapInfoLayer; +import net.osmand.plus.views.OsmandMapLayer.DrawSettings; import net.osmand.plus.views.OsmandMapTileView; +import net.osmand.plus.views.mapwidgets.MapWidgetRegistry; import net.osmand.plus.views.mapwidgets.TextInfoWidget; import net.osmand.util.Algorithms; import net.osmand.util.GeoPointParserUtil.GeoParsedPoint; @@ -721,34 +723,58 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { } } - private void registerWidget(MapActivity activity) { + private void registerWidget(final MapActivity activity) { MapInfoLayer mapInfoLayer = activity.getMapLayers().getMapInfoLayer(); if (mapInfoLayer != null) { - recordControl = new TextInfoWidget(activity); - if (mediaRec != null && mediaRecFile != null) { - updateRecordControl(activity, mediaRecFile); - } else { - recordControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.monitoring_rec_inactive)); - setRecordListener(recordControl, activity); - } - mapInfoLayer.registerSideWidget(recordControl, R.drawable.ic_action_micro_dark, - R.string.map_widget_av_notes, "audionotes", false, 32); + recordControl = new TextInfoWidget(activity) { + + private Boolean cachedRecording; + + @Override + public boolean updateInfo(DrawSettings drawSettings) { + boolean recording = isRecording(); + if (!Algorithms.objectEquals(recording, cachedRecording)) { + cachedRecording = recording; + if (recording) { + setText(app.getString(R.string.shared_string_control_stop), null); + setIcons(R.drawable.widget_icon_av_active, R.drawable.widget_icon_av_active); + } else { + setText(app.getString(R.string.shared_string_control_start), null); + Integer action = AV_DEFAULT_ACTION.get(); + switch (action) { + case AV_DEFAULT_ACTION_VIDEO: + setIcons(R.drawable.widget_av_video_day, R.drawable.widget_av_video_night); + break; + case AV_DEFAULT_ACTION_TAKEPICTURE: + setIcons(R.drawable.widget_av_photo_day, R.drawable.widget_av_photo_night); + break; + case AV_DEFAULT_ACTION_AUDIO: + setIcons(R.drawable.widget_av_audio_day, R.drawable.widget_av_audio_night); + break; + default: + setIcons(R.drawable.widget_icon_av_inactive_day, R.drawable.widget_icon_av_inactive_night); + break; + } + } + } + return false; + }; + }; + recordControl.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (isRecording()) { + stopRecording(mapActivity, false); + } else { + defaultAction(mapActivity); + } + } + }); + mapInfoLayer.registerSideWidget(recordControl, new AudioVideoNotesWidgetState(app), "audionotes", false, 32); mapInfoLayer.recreateControls(); } } - private void setRecordListener(final TextInfoWidget recordPlaceControl, final MapActivity mapActivity) { - recordPlaceControl.setText(app.getString(R.string.shared_string_control_start), ""); - updateWidgetIcon(recordPlaceControl); - recordPlaceControl.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(View v) { - defaultAction(mapActivity); - } - }); - } - private void updateWidgetIcon(final TextInfoWidget recordPlaceControl) { recordPlaceControl.setIcons(R.drawable.widget_icon_av_inactive_day, R.drawable.widget_icon_av_inactive_night); @@ -1591,18 +1617,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { mediaRecFile = f; recordingMenu.show(); - updateRecordControl(mapActivity, f); - } - - private void updateRecordControl(final MapActivity mapActivity, final File f) { - recordControl.setText(app.getString(R.string.shared_string_control_stop), ""); - recordControl.setIcons(R.drawable.widget_icon_av_active, R.drawable.widget_icon_av_active); - recordControl.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - stopRecording(mapActivity, false); - } - }); + mapActivity.refreshMap(); } public void stopRecording(final MapActivity mapActivity, boolean restart) { @@ -1610,12 +1625,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { if (!restart || !stopMediaRecording(true)) { recordingDone = true; stopMediaRecording(false); - if (recordControl != null) { - setRecordListener(recordControl, mapActivity); - } SHOW_RECORDINGS.set(true); - mapActivity.getMapView().refreshMap(); - updateWidgetIcon(recordControl); + mapActivity.refreshMap(); closeRecordingMenu(); } } @@ -2112,4 +2123,94 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { public DashFragmentData getCardFragment() { return DashAudioVideoNotesFragment.FRAGMENT_DATA; } + + public class AudioVideoNotesWidgetState extends MapWidgetRegistry.WidgetState { + + private static final int AV_WIDGET_STATE_ASK = R.id.av_notes_widget_state_ask; + private static final int AV_WIDGET_STATE_AUDIO = R.id.av_notes_widget_state_audio; + private static final int AV_WIDGET_STATE_VIDEO = R.id.av_notes_widget_state_video; + private static final int AV_WIDGET_STATE_PHOTO = R.id.av_notes_widget_state_photo; + + AudioVideoNotesWidgetState(OsmandApplication ctx) { + super(ctx); + } + + @Override + public int getMenuTitleId() { + Integer action = AV_DEFAULT_ACTION.get(); + switch (action) { + case AV_DEFAULT_ACTION_AUDIO: + return R.string.av_def_action_audio; + case AV_DEFAULT_ACTION_VIDEO: + return R.string.av_def_action_video; + case AV_DEFAULT_ACTION_TAKEPICTURE: + return R.string.av_def_action_picture; + default: + return R.string.map_widget_av_notes; + } + } + + @Override + public int getMenuIconId() { + Integer action = AV_DEFAULT_ACTION.get(); + switch (action) { + case AV_DEFAULT_ACTION_AUDIO: + return R.drawable.ic_action_micro_dark; + case AV_DEFAULT_ACTION_VIDEO: + return R.drawable.ic_action_video_dark; + case AV_DEFAULT_ACTION_TAKEPICTURE: + return R.drawable.ic_action_photo_dark; + default: + return R.drawable.ic_action_photo_dark; + } + } + + @Override + public int getMenuItemId() { + Integer action = AV_DEFAULT_ACTION.get(); + switch (action) { + case AV_DEFAULT_ACTION_AUDIO: + return AV_WIDGET_STATE_AUDIO; + case AV_DEFAULT_ACTION_VIDEO: + return AV_WIDGET_STATE_VIDEO; + case AV_DEFAULT_ACTION_TAKEPICTURE: + return AV_WIDGET_STATE_PHOTO; + default: + return AV_WIDGET_STATE_ASK; + } + } + + @Override + public int[] getMenuTitleIds() { + return new int[]{R.string.av_def_action_choose, R.string.av_def_action_audio, R.string.av_def_action_video, R.string.av_def_action_picture}; + } + + @Override + public int[] getMenuIconIds() { + return new int[]{R.drawable.ic_action_photo_dark, R.drawable.ic_action_micro_dark, R.drawable.ic_action_video_dark, R.drawable.ic_action_photo_dark}; + } + + @Override + public int[] getMenuItemIds() { + return new int[]{AV_WIDGET_STATE_ASK, AV_WIDGET_STATE_AUDIO, AV_WIDGET_STATE_VIDEO, AV_WIDGET_STATE_PHOTO}; + } + + @Override + public void changeState(int stateId) { + switch (stateId) { + case AV_WIDGET_STATE_AUDIO: + AV_DEFAULT_ACTION.set(AV_DEFAULT_ACTION_AUDIO); + break; + case AV_WIDGET_STATE_VIDEO: + AV_DEFAULT_ACTION.set(AV_DEFAULT_ACTION_VIDEO); + break; + case AV_WIDGET_STATE_PHOTO: + AV_DEFAULT_ACTION.set(AV_DEFAULT_ACTION_TAKEPICTURE); + break; + default: + AV_DEFAULT_ACTION.set(AV_DEFAULT_ACTION_CHOOSE); + break; + } + } + } } From 35a8f659759b24cc3e3a417023d09a3ac829b2a2 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Mon, 17 Feb 2020 19:24:33 +0300 Subject: [PATCH 070/120] Cleanup code --- .../plus/audionotes/AudioVideoNotesPlugin.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index f957ddb0e8..93a46415cf 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -775,21 +775,6 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { } } - private void updateWidgetIcon(final TextInfoWidget recordPlaceControl) { - recordPlaceControl.setIcons(R.drawable.widget_icon_av_inactive_day, - R.drawable.widget_icon_av_inactive_night); - if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_VIDEO) { - recordPlaceControl.setIcons(R.drawable.widget_av_video_day, - R.drawable.widget_av_video_night); - } else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_TAKEPICTURE) { - recordPlaceControl.setIcons(R.drawable.widget_av_photo_day, - R.drawable.widget_av_photo_night); - } else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_AUDIO) { - recordPlaceControl.setIcons(R.drawable.widget_av_audio_day, - R.drawable.widget_av_audio_night); - } - } - public void defaultAction(final MapActivity mapActivity) { final Location loc = app.getLocationProvider().getLastKnownLocation(); // double lat = mapActivity.getMapView().getLatitude(); From d352b5fa9aa6584e7ead8dc63ee9c804a4c31475 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 17:26:29 +0100 Subject: [PATCH 071/120] Fix straight line routing --- OsmAnd/src/net/osmand/plus/views/RouteLayer.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index fa427d61b7..f9aa43445f 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -38,6 +38,7 @@ import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenu.TrackChartPoints; import net.osmand.plus.render.RenderingIcons; import net.osmand.plus.routing.RouteCalculationResult; import net.osmand.plus.routing.RouteDirectionInfo; +import net.osmand.plus.routing.RouteProvider; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.routing.TransportRoutingHelper; import net.osmand.plus.transport.TransportStopRoute; @@ -1105,10 +1106,13 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont startLocation, 0, false, null); } } else { + RouteCalculationResult route = helper.getRoute(); + boolean directTo = route.getRouteService() == RouteProvider.RouteService.DIRECT_TO; routeGeometry.clearTransportRoute(); routeGeometry.updateRoute(tb, route); - if (helper.getRoute().isShowOriginalRoute() && helper.getOriginalStartingLocation() != null) { + RouteProvider.RouteService rs = helper.getRoute().getRouteService(); + if (directTo && helper.getOriginalStartingLocation() != null) { routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, helper.getOriginalStartingLocation(), 0, true, null); } else { @@ -1141,12 +1145,12 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont } List rd = helper.getRouteDirections(); Iterator it = rd.iterator(); - if (!helper.getRoute().isShowOriginalRoute() && tb.getZoom() >= 14) { + if (!directTo && tb.getZoom() >= 14) { List actionPoints = calculateActionPoints(topLatitude, leftLongitude, bottomLatitude, rightLongitude, helper.getLastProjection(), helper.getRoute().getRouteLocations(), helper.getRoute().getCurrentRoute(), it, tb.getZoom()); drawAction(tb, canvas, actionPoints); } - if (helper.getRoute().isShowOriginalRoute()) { + if (directTo) { //add projection point on original route double[] projectionOnRoute = calculateProjectionOnRoutePoint( helper.getOriginalRouteAllLoc(), helper, tb); From da915f191dc331d6dfa4c2456993b6e9773b64b0 Mon Sep 17 00:00:00 2001 From: Guntis Ozols Date: Mon, 17 Feb 2020 14:06:11 +0000 Subject: [PATCH 072/120] Translated using Weblate (Latvian) Currently translated at 69.0% (2200 of 3184 strings) --- OsmAnd/res/values-lv/strings.xml | 74 ++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/OsmAnd/res/values-lv/strings.xml b/OsmAnd/res/values-lv/strings.xml index 8d5740e410..190a01101f 100644 --- a/OsmAnd/res/values-lv/strings.xml +++ b/OsmAnd/res/values-lv/strings.xml @@ -3208,4 +3208,78 @@ No Afganistānas līdz Zimbabvei, no Austrālijas līdz ASV, Argentīna, Brazīl Logcat buferis Spraudņu iestatījumi Pēc noklusējuma + %1$s %2$s + %1$s: %2$s + Maršrutēšanas noteikumi nav atrodami %1$s\'. Lūdzu izvēlieties citu failu. + Izvēlieties atbalstītu %1$s paplašinājuma failu. + Importēt no faila + Importēt maršrutēšanas failu + Importēt profilu + Navigācija, žurnalēšanas precizitāte + Bilžu izmērs, audio un video kvalitāte + Pieteikšanās, parole, bezsaistes rediģēšana + Izvēlieties ikonu, krāsu un nosaukumu + Atļaut koplietot tekošo lokāciju, lietojot ceļa ierakstīšanu. + Sekošana tiešsaistē + žurnalēšanas precizitāte + Jūsu ierakstītie treki atrodas %1$s vai OsmAnd mapē. + Jūsu OSM piezīmes atrodas %1$s. + Video piezīmes + Foto piezīmes + Maršruta pārrēķināšana + Paziņošana + Lietotāja vārds un parole + Šie iestatījumi darbosies visos profilos. + OSM rediģēšana + Skatiet vēl neaugšupielādētos labojumus vai OSM kļūdas %1$s mapē. Augšupielādētie punkti vairs netiks rādīti. + OSM + Ikona, kas redzama naviģējot vai pārvietojoties. + Ikona, kas redzama pārtraukumos. + Skatiet un koplietojiet detalizētus lietotnes žurnālus + Ir nepieciešama atļauja darbības veikšanai. + šis ir maza ātruma izslēdzošais filtrs, kas neieraksta punktus zem noteikta ātruma. Tas padara ierakstītos trekus gludākus, skatot tos uz kartes. + Blakus efekts: Jūsu trekos iztrūks daļas, kur minimālā ātruma kritērijs netiks sasniegts (piemēram, stumjot braucamo stāvā kalnā). Tāpat nebūs informācija par pārtraukumiem, atpūtas brīžiem. Tas ietekmēs datu analīzes kā piemēram, mēģinot noteikt kopējo brauciena garumu, laiku atrodoties kustībā vai vidējo kustības ātrumu. + Laika buferis + Sekošanas intervāls + Tīkla adrese + Minimālais ātrums + Minimālā precizitāte + Minimālā pārvietošanās + Atjaunot spraudņa iestatījumus uz noklusētajiem + Ieraksta dalīšana + Lietot sistēmas lietotni + Kameras slēdža skaņa + Autorizācija veiksmīga + Pārkārtot kategorijas + Jūs varat pievienot savas kategorijas, paslēpt liekās kategorijas un mainīt kārtošanas secību. Saraksts var tikt importēts un eksportēts ar profiliem. + Jūs varat izveidot jaunu kategoriju, atzīmējot vienu vai vairākas vajadzīgās kategorijas. + Atjaunot uz noklusēto atjaunos noklusēto kārtošanas secību pēc instalācijas. + Pieejams + Pievienot savu kategoriju + Rādīt tikai naktī + Visi spraudņu iestatījumi ir atjaunoti uz noklusētajiem. + Visi profilu iestatījumi ir atjaunoti uz noklusētajiem. + %1$s/%2$s + Saulriets %1$s + Saullēkts %1$s + Pieejamības režīms jūsu sistēmā ir deaktivizēts. + Izmantot sistēmas ekrāna noildzes laiku + Deaktivizēts pēc noklusējuma, ja OsmAnd darbosies priekšplānā, ekrānam nebūs noildze. +\n +\nAktivizējot, OsmAnd lietos ierīces sistēmas iestatījumus ekrāna noildzes laikam. + Izdzēst ierakstītos datus + Kopēt koordinātas + Lūdzu, izvēlieties profila nosaukumu + Atvērt iestatījumus + Spraudnis deaktivizēts + Šis spraudnis ir kā atsevišķa lietotne, kas ir jānoņem atsevišķi, ja jūs vairs to neplānojat lietot. +\n +\nSpraudnis paliks uz ierīces arī pēc OsmAnd noņemšanas. + Izvēlne + %1$s — %2$s — %3$s + Maršrutēšana + Pielāgots renderēšanas stils + Iekļaut papildus datus + Importētais profils satur papildus datus. Spiediet uz Importēt, lai importētu tikai profilu datus vai izvēlieties arī papildus datus, ko importēt. + Jūs varat izvēlēties arī papildus datus, ko eksportēt kopā ar profilu. \ No newline at end of file From 2e70efc319ec557b1ea8190b1e9cac5290fcee69 Mon Sep 17 00:00:00 2001 From: nautilusx Date: Sun, 16 Feb 2020 12:22:16 +0000 Subject: [PATCH 073/120] Translated using Weblate (German) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-de/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index aea41b79ef..0568574418 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -446,8 +446,7 @@ Weitere installieren… Verwenden Sie Rasterkarten für alles, was über diese Ebene hinausgeht. Minimale Vektor-Zoomstufe - - Online OSM Klassifizierung mit Bildern. + string name=\"route_descr_current_location\">Aktueller Standort</string Offline-Suche konnte nicht durchgeführt werden. Suche nach Standort Systemeinstellung From 3d08582ba35e1acfe7d9a50c3bbd3ed19f2ad3d2 Mon Sep 17 00:00:00 2001 From: Mr-Update Date: Sun, 16 Feb 2020 14:05:44 +0000 Subject: [PATCH 074/120] Translated using Weblate (German) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-de/strings.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 0568574418..7f4a275f55 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -2773,7 +2773,7 @@ Lon %2$s OsmAnd-Team App neustarten Bilder anzeigen - Sie haben ihr OsmAnd-Live-Abonnement gekündigt + Sie haben Ihr OsmAnd-Live-Abonnement gekündigt Erneuern Sie Ihr Abonnement, um weiterhin alle Funktionen nutzen zu können: Basierend auf den Artikeln, die Sie mit einem Lesezeichen versehen haben, werden Ihnen die folgenden Karten zum Download empfohlen: Benötigte Karten @@ -2999,7 +2999,7 @@ Lon %2$s Wählen Sie öffentliche Verkehrsmittel aus, die Sie für die Navigation vermeiden möchten: Verkehrsmittel ausschließen… Gehen - Kürzen sie die Länge des Tags „%s“ auf weniger als 255 Zeichen. + Kürzen Sie die Länge des Tags „%s“ auf weniger als 255 Zeichen. Länge des Wertes „%s“ %s Modus Kein Kopfsteinpflaster oder Pflastersteine @@ -3058,7 +3058,7 @@ Lon %2$s Helfen Sie uns, die Beliebtheit von OsmAnd-Funktionen zu verstehen. Auf „Erlauben“ tippen, wenn Sie mit unserer %1$s einverstanden sind Datenschutz und Sicherheit - Wählen Sie, welche Daten sie freigeben möchten + Wählen Sie, welche Daten Sie freigeben möchten Nein, danke Erlauben Profilname @@ -3544,4 +3544,5 @@ Lon %2$s Bemerkung: Wenn das GPS unmittelbar vor einer Aufzeichnung ausgeschaltet war, kann der erste gemessene Punkt eine verminderte Genauigkeit haben, sodass wir in unserem Code vielleicht eine Sekunde oder so warten wollen, bevor ein Punkt (oder der beste von 3 aufeinanderfolgenden Punkten usw.) aufgezeichnet wird. Das ist aber noch nicht implementiert. Aufzeichnungsteilung Direkt zum Punkt + Geo-Intent \'%s\' konnte nicht analysiert werden. \ No newline at end of file From 944a0a0652d3d44289d09066ead5ea7bd027ec32 Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Mon, 17 Feb 2020 01:20:17 +0000 Subject: [PATCH 075/120] Translated using Weblate (Japanese) Currently translated at 99.2% (3159 of 3184 strings) --- OsmAnd/res/values-ja/strings.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index db2cfdae99..8c376f08dd 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -1164,13 +1164,13 @@ POIの更新は利用できません 文字列 森林、低木等 ズーム15で建物表示 - 詳細も表示 + 詳細を表示 詳細を省く 通行制限 通行制限と料金所を表示 道路の品質を表示 路面を表示 - 自転車ルートを表示 + 自転車ルート 停止 新しいセグメントの開始 ダウンロードできるものが見つかりません、インターネットの接続を確認して下さい。 @@ -1367,9 +1367,9 @@ POIの更新は利用できません タクシーのルート共有 トロリーバスでのルート バスでのルート - 省略したい描写 - 追加描写したいルート - 追加したい描写 + 描写の省略 + ルートの追加描写 + 描写の追加 交通機関の追加描写 その他のマップ属性 その他の要素 @@ -1880,7 +1880,7 @@ POIの更新は利用できません マップマーカー マップマーカー表示位置 ポリゴンによる描画をオフにすることを推奨します。 - マウンテンバイク用ルートを表示 + マウンテンバイク用ルート ポリゴンを表示 駐車場を探す 通行止め @@ -2109,7 +2109,7 @@ POIの更新は利用できません 標高データを使用 SRTM、ASTER、EU-DEMによる地形標高データを使用します。 水域 - 水域を非表示 + 水域ポリゴン 近隣のWikipedia記事 記録機能のクイックスタートを有効化 旅行記録を許可するシステム通知を表示します。 @@ -2748,7 +2748,7 @@ POIの更新は利用できません 経路内の全ての経由地点を追加する、もしくはカテゴリー別に選択してください。 トータル グループを削除しました - リバースポーツ(川遊び、リバーアクティビティ) + リバースポーツ 遠い順 近い順 DD°MM′SS″ @@ -3388,7 +3388,7 @@ POIの更新は利用できません 経路が保存されました ファイル名が空欄です 初期値に戻す - 自転車ルートのノードネットワーク表示 + 自転車ルートのノードネットワーク %1$sを消去しますか? マップダウンロードダイアログ ダイアログと通知 @@ -3415,14 +3415,14 @@ POIの更新は利用できません 静止中の位置アイコン [適用]をタップすると、プロファイルが完全に削除されます。 マスタープロファイル - プロファイルの色選択 + プロファイルの色 OsmAndの標準プロファイルは削除できませんが、前の画面でそれらを無効にしたり、リストの下の方へ移動させることはできます。 プロファイルの編集 \'ナビゲーションタイプ\'は、ルート計算方法の管理をおこないます。 プロファイルの外観 アイコンの色と名前 プロファイルリストの編集 - 選択されたプロファイル + 現在選択中のプロファイル \'%1$s\'にはルーティングルールがありません。別のファイルを選択してください。 対応している拡張ファイル%1$sを選択してください。 アプリケーションの詳細なログを共有し確認しあえるようにします @@ -3484,7 +3484,7 @@ POIの更新は利用できません 一つあるいは複数のカテゴリーを選択して、新しいカスタムカテゴリーを追加できます。 利用可 カスタムカテゴリーを追加 - 夜にのみ表示 + 夜間限定表示 すべてのプラグイン設定が初期状態に戻りました。 すべてのプロファイル設定が初期状態に戻りました。 日出時刻 From b39b9bd301dbb65ab9577c9fc3ae8c00e02ec3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sveinn=20=C3=AD=20Felli?= Date: Sun, 16 Feb 2020 21:39:26 +0000 Subject: [PATCH 076/120] Translated using Weblate (Icelandic) Currently translated at 99.8% (3179 of 3184 strings) --- OsmAnd/res/values-is/strings.xml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-is/strings.xml b/OsmAnd/res/values-is/strings.xml index 813231e2f6..c2d6c0805a 100644 --- a/OsmAnd/res/values-is/strings.xml +++ b/OsmAnd/res/values-is/strings.xml @@ -1607,7 +1607,7 @@ Punktar Talhraði Sjómerki Reikna leiðina fyrst - Tíglagögn: %1$s + Kortaflísagögn: %1$s Sporöskjulagað Mercator Aðvaranir vegna umferðar Settu OSM-notandanafn og lykilorð inn í stillingarnar @@ -2016,7 +2016,7 @@ Stendur fyrir svæði: %1$s x %2$s Letur fyrir kort Ekið á hægri akrein Sjálfvirkt - Nota í yfirborðshæðargögnum (í gegnum SRTM, ASTER og EU-DEM). + Nota yfirborðshæðargögn (í gegnum SRTM, ASTER og EU-DEM). Skipta skráningu sjálfvirkt eftir bil Stigvaxandi leit í borg Veldu þegar birta á kort einungis með vegum: @@ -3500,6 +3500,20 @@ Stendur fyrir svæði: %1$s x %2$s %1$s/%2$s Sólsetur kl. %1$s Sólarupprás kl. %1$s - Endurstilling á sjálfgefið mun eyða öllum sérsniðnum flokkum og setja röðun í upprunalega stöðu eftir uppsetningu. + Endurstilling á sjálfgefið mun setja röðun í upprunalega stöðu eftir uppsetningu. Altækur aðgangur er óvirkur á kerfinu þínu. + Nota tímamörk kerfis fyrir skjá + Hreinsa upptökugögn + Afrita staðsetningarhnit + Beint-á-punkt + Raða eftir flokki + Gefðu þessu sniði eitthvað nafn + Opna stillingar + Viðbótin er óvirk + Valmynd + %1$s — %2$s — %3$s + Leiðagerð + Sérsniðinn myndgerðaðrstíll + Taka með viðbótargögn + Suðurskautslandið \ No newline at end of file From 1567538f65444133d934731ccc2a30e4ea5a2854 Mon Sep 17 00:00:00 2001 From: Ahmad Alfrhood Date: Sun, 16 Feb 2020 14:33:09 +0000 Subject: [PATCH 077/120] Translated using Weblate (Arabic) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-ar/strings.xml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index def6d059fb..92dc58ab32 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -876,11 +876,11 @@ أوروبا - بريطانيا العظمى تفضيلات الطريق معلومات الطريق - تجنب الطرق ذات الرسوم + لا توجد طرق رسوم تجنب الطرق برسوم تجنب الطرق غير المعبّدة اجتناب الطرق الترابية والوعرة - تجنب العبّارات + لا العبارات وزن المركبة منذ نسخة أندرويد كتكات 4.4، لا يمكنك تحميل أو تحديث الخرائط في مكان التخزين السابق (%s). هل تريد التغيير إلى مكان مسموح ونسخ كل الملفات إليه ؟ ملاحظات: 1-الملفات القديمة ستبقى كما هي (يمكن حذفها يدويا). 2-لايمكن مشاركة الملفات بين OsmAnd و +OsmAnd في مكان التخزين الجديد. ينسخ الملف (%s) إلى مساره الجديد… @@ -1240,8 +1240,8 @@ حدد الوجهة تفضيل طرق الدراجات النارية تفضيل طرق الدراجات النارية - تجنب العبّارات المائية - تجنب الطرق السريعة + تجنب العبّارات + لا طرق السريعة تجنب طرق الدراجات النارية تحديد الوزن الأعلى المسموح به على الطرق. نسخ ملفات OsmAnd إلى المسار الجديد (%s)… @@ -1852,7 +1852,7 @@ ميل بحري ميل بحري/س إجراء محاكاة تخيلية باستخدام توجيه نشط أو مسار مسجل. - تجنب قطار المدينة + لا خدمة نقل القطار يتجنب استخدام القطارات المكوكية خطر مخطط واضح @@ -1877,9 +1877,9 @@ اللغة المفضلة للمسميات على الخريطة (إذا لم تكن متوفرة ستتحول إلى اللغة الإنجليزية أو الأسماء المحلية). خشب وشجيرات الهنغارية (الرسمية) - تجنب الأدراج - تجنب الأدراج - تجنب عبور الحدود إلى بلد آخر + لا سلالم + تجنب السلالم + تجنب عبور الحدود الوطنية تحديد الارتفاع الأعلى المسموح به على الطرق. تعطيل 2-مرحلة التوجيه للملاحة بالسيارة. نادي جبال الألب السويسرية @@ -2157,7 +2157,7 @@ خطأ في OLC \n قم بالضغط على الزر لفترة أطوَل ثم اسحبه لتغيير مكانه على الشاشة. - محيطات الأعماق البحرية + معالم العمق البحري تقسيم المسارات آلياً إلى أجزاء بعد كل فراغ تقصير رمز التموضع المفتوح يُرجى تقديم رمزٍ كامل اسم الإجراء السريع مكرر @@ -2545,7 +2545,7 @@ الانتقال إلى الحقل التالي تعديل تسمية العلامة مجموع التبرعات - POI تسميات + تسميات POI بدون اسم توقفت عند حدد مفضلة لإضافتها إلى العلامات. @@ -3438,4 +3438,10 @@ تضمين بيانات إضافية يمكنك تحديد بيانات إضافية للتصدير مع الملف الشخصي. القارة القطبية الجنوبية + هذا البرنامج المساعد هو تطبيق منفصل ، بإمكانك إزالته بشكل منفصل إذا لم تعد تخطط لاستخدامه. +\n +\nسيبقى المكوّن الإضافي على الجهاز بعد إزالة OsmAnd. + %1$s — %2$s — %3$s + أسلوب تقديم مخصص + يحتوي ملف التعريف المستوردة على بيانات إضافية. انقر فوق \"استيراد\" لاستيراد بيانات ملف التعريف فقط أو حدد بيانات إضافية لاستيرادها. \ No newline at end of file From a579e66e8c467e160a7c1156f70ac48a01f7e5aa Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Mon, 17 Feb 2020 14:50:35 +0000 Subject: [PATCH 078/120] Translated using Weblate (Sardinian) Currently translated at 95.9% (3054 of 3184 strings) --- OsmAnd/res/values-sc/strings.xml | 99 ++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 38 deletions(-) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 60010046ba..53a55af4d1 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -2186,7 +2186,7 @@ Pro praghere iscrie su còdighe intreu Iscroba automaticamente sas registratziones Incumintza unu segmentu nou a pustis de una pàusa de 6 minutos, una rasta noa a pustis de 2 oras o unu documentu nou si sa pàusa est istada prus longa e sa data est cambiada. Unu butone pro fàghere iscùrrere sa lista in suta. - Lìnias nàuticas de profondidade + Curvas de profondidade nàuticas Ammustra sas lìnias de profondidade. Imprea sos datos de s\'artària Fatore pro s\'artària de su terrinu (dae datos SRTM, ASTER e EU-DEM). @@ -3244,7 +3244,7 @@ Pro praghere iscrie su còdighe intreu Àplica a totu sos profilos Messàgiu de allughìngiu Istatìsticas - Ammustra sa mapa in subra de s\'ischermada de blocu durante sa navigatzione. + Ammustra sa mapa in s\'ischermada de blocu durante sa navigatzione. Impostatziones de càlculu de s\'àndala pro su profilu ischertadu \"%1$s\". Tempus de ischidada Unidades e formados @@ -3284,8 +3284,8 @@ Pro praghere iscrie su còdighe intreu Incolla s\'àndala pro sa cartella cun sos datos de OsmAnd Mudare sa cartella de sos datos de OsmAnd\? Tràmuda a sa destinatzione noa - Memòria interna, cuada dae s\'impreadore e dae sas àteras aplicatziones, a sa cale podet atzèdere OsmAnd ebbia - Muda sa cartella de archiviatzione de datos de OsmAnd + Memòria interna pro OsmAnd (cuada dae s\'impreadore e dae sas àteras aplicatziones). + Muda sa cartella de archiviatzione Parcu de nie Islita tragiada Islita @@ -3330,15 +3330,15 @@ Pro praghere iscrie su còdighe intreu %1$s MB impreados %1$s kB impreados Curvas de livellu e umbradura de sos rilievos - Privilègia sos caminos non apamentados - Privilègia sos caminos non apamentados. + Privilègia sos caminos no apamentados + Privilègia sos caminos no apamentados. Agiorna totu sas mapas Ses seguru de chèrrere agiornare totu (%1$d) sas mapas\? • Impostatziones de s\'aplicatzione e de profilu agiornadas. Sas impostatziones como sunt ordinadas pro casta. Cada profilu si podet personalizare a banda dae sos àteros. \n \n • Su diàlogu de iscarrigamentu nou cussigiat una mapa de iscarrigare durante s\'esploratzione \n -\n • Acontzos a su tema pro sa note +\n • Acontzos a su tema iscuru \n \n • Problemas de s\'àndalas in totu su mundu acontzados \n @@ -3354,9 +3354,9 @@ Pro praghere iscrie su còdighe intreu Podes aplicare custa modìfica a totu sos profilos o a su chi est ischertadu ebbia. Cumpartzidu Privilègia sos caminos non apamentados - Privilègia sos caminos non apamentados. + Preferi caminos no apamentados a sos caminos pamentados pro s\'àndala. Modìficas de OSM - Unu butone pro ammustrare o cuare sas curvas de livellu in sa mapa. + Butone chi ammustrat o cuat sas curvas de livellu in sa mapa. Ammustra sas curvas de livellu Cua sas curvas de livellu Ammustra/cua sas curvas de livellu @@ -3364,17 +3364,17 @@ Pro praghere iscrie su còdighe intreu Ammustra sas umbraduras de sos rilievos Cua sas umbraduras de sos rilievos Ammustra/cua sas umbraduras de sos rilievos - Allughidura de su motore de sìntesi vocale fallida + Allughidura de su motore de sìntesi vocale fallida. Sìmula sa positzione tua impreende una rasta GPX registrada. Esporta su profilu Profilu de OsmAnd: %1$s - Su profilu \'%1$s\' esistit giai. Lu cheres subra-iscrìere\? + \'%1$s\' esistit giai. Lu cheres subra-iscrìere\? Esportatzione de su profilu fallida. Importa su profilu - Pro importare unu profilu ischerta su documentu suo in su dispositivu e aberi·lu cun OsmAnd. + Annanghe unu profilu aberende su documentu suo cun OsmAnd. Errore de importatzione de %1$s: %2$s - %1$s importadu chene problemas. - Impreadu pro fàghere un\'isrìtima de s\'ora de arribu pro castas disconnotas de caminu e pro limitare sa lestresa pro totu sos caminos (diat pòdere mudare s\'àndala) + %1$s importadu. + Istimat s\'ora de arribu pro castas disconnotas de caminu, e limitat sa lestresa pro totu sos caminos (diat pòdere mudare s\'àndala) Biancu Cuncàmbia %1$s e %2$s Puntu de incumintzu @@ -3385,12 +3385,12 @@ Pro praghere iscrie su còdighe intreu Cheres isbodiare %1$s\? Diàlogu de iscarrigamentu de sa mapa Diàlogos e notìficas - Controlla sas ventaneddas a cumparsa, sos diàlogos e sas notìficas chi OsmAnd ammustrat durante s\'impreu. + Controlla sas ventaneddas a cumparsa, sos diàlogos e sas notìficas. Retzas de nodos Mapas cussigiadas - Custas mapas sunt netzessàrias pro s\'impreu de s\'estensione + Custas mapas sunt netzessàrias pro s\'estensione Profilos annànghidos - S\'estensione annanghet unu profilu nou a OsmAnd + Profilos annànghidos dae s\'estensione Istuda Estensione noa annànghida Ammustra sas àndalas tziclàbiles de sas retzas de nodos @@ -3403,27 +3403,27 @@ Pro praghere iscrie su còdighe intreu Personale Iscarrighende %s Grussa - Pro sos desertos e sas àteras àreas cun una populatzione minore. Ammustrat prus minujas in un\'iscala de visualizatzione. - Ischerta s\'icona de navigatzione - Ischerta s\'icona de sa mapa - A pustis de àere incarcadu Àplica sos profilos iscantzellados s\'ant a pèrdere definitivamente. + Pro sos desertos e sas àteras àreas cun una populatzione minore. Prus a sa minuda. + Icona de positzione in movimentu + Icona de positzione in pasu + Incarchende \'Àplica\' as a iscantzellare definitivamente sos profilos rimòvidos. Profilu printzipale Ischerta su colore - Non podes iscantzellare sos profilos predefinidos de OsmAnd, ma los podes disabilitare in s\'ischermada anteposta, o los podes mòvere a giosso. + Non podes iscantzellare sos profilos predefinidos de OsmAnd, ma los podes disabilitare (in s\'ischermada anteposta), o los podes mòvere a giosso. Muda sos profilos - Sa casta de navigatzione influentzat sas règulas pro sos càlculos de sas àndalas. + Sa \'Casta de navigatzione\' influentzat su càlculu de sas àndalas. Aparèntzia de su profilu - Issèbera s\'icona, su colore e su nùmene + Icona, colore e nùmene Muda sa lista de sos profilos Profilu ischertadu - Incarchende %1$s, as a pèrdere totu sas modìficas tuas. - Totu sas impostatziones de su profilu ant a torrare a s\'istadu chi teniant in antis de s\'installatzione. - Ripristinare totu sas impostatziones de su profilu a sos valores predefinidos\? + Incarchende %1$s as a iscartare totu sas modìficas tuas. + Faghe torrare totu sas impostatziones de su profilu a sos valores predefinidos. + Ripristinare totu sas impostatziones de su profilu\? %1$s: %2$s %1$s %2$s Vota - Su documentu \'%1$s\' non cuntenet règulas pro su càlculu de àndalas. Pro praghere issèbera un\'àteru documentu. - Casta de documentu non suportada. Depes ischertare unu documentu cun s\'estensione %1$s. + In su documentu \'%1$s\' non b\'ant règulas pro su càlculu de àndalas. Pro praghere issèbera un\'àteru documentu. + Ischerta unu documentu suportadu cun s\'estensione %1$s. Importa dae unu documentu Importa unu documentu pro su càlculu de s\'àndala Importa unu profilu @@ -3431,23 +3431,23 @@ Pro praghere iscrie su còdighe intreu Mannària de s\'immàgine, calidade de s\'àudio e de su vìdeu Intrada, crae, modìfica non in lìnia Issèbera s\'icona, su colore e su nùmene - Ti permitit de cumpartzire sa positzione atuale impreende sa registratzione de su biàgiu. + Permitit de cumpartzire sa positzione atuale impreende sa registratzione de su biàgiu. Arrastamentu in lìnia Pretzisione de registratzione - Podes agatare totu sas rastas registradas tuas in %1$s o in sa cartella de OsmAnd impreende su gestore de documentos. - Podes agatare totu sas notas tuas in %1$s + Podes agatare totu sas rastas registradas tuas in %1$s o in sa cartella de OsmAnd. + Sas notas tuas sunt in %1$s Vìdeo-notas Foto-notas Ricàlculu de s\'àndala Annùntzia Nùmene impreadore e crae - Sas impostatziones de s\'estensione sunt globales, e si aplicant a totu sos profilos. - Modìfica de OpenStreetMap - Podes pompiare totu sas modìficas non carrigadas tuas o sos errores de osm in %1$s. Sos puntos carrigados no ant a èssere ammustrados in OsmAnd. + Custas impostatziones s\'aplicant a totu sos profilos. + Modìfica de OSM + Pòmpia sas modìficas o sos errores de osm non carrigados tuos in %1$s. Sos puntos carrigados no ant a èssere ammustrados prus. OSM - As a bìdere s\'icona petzi durante sa navigatzione o su movimentu. - S\'icona de sa mapa aparit in sa mapa ebbia, e divenit s\'icona de navigatzione durante sa navigatzione. - Inoghe podes pompiare e cumpartzire sos registros de s\'aplicatzione + Icona ammustrada durante sa navigatzione o su movimentu ebbia. + Icona ammustrada in pàusa. + Verìfica e cumpartzi sos registros de s\'aplicatzione fatos a sa minuda Anàlisi de su geo intent \'%s\' fallida. Pro impreare custa optzione b\'at bisòngiu de unu permissu. Custu est unu filtru pro non registrare puntos in suta de una lestresa isseberada. Faghet in modu chi sas rastas registradas pàrgiant prus regulares cando benint pompiadas in sa mapa. @@ -3477,4 +3477,27 @@ Pro praghere iscrie su còdighe intreu %1$s/%2$s Intrinada a sas %1$s Arbèschida a sas %1$s + Custu at a registrare petzi sos puntos medidos cun un\'acuradesa mìnima indicada (in metros/pees, comente benit sinnaladu dae Android pro su chipset tuo). S\'acuradesa si riferit a sa dispersione de movimentos torrados a repìtere, e no est ligada diretamente a sa pretzisione, chi definit canto sa medida tua est a curtzu a sa positzione bera tua. + Ripristinende sos valores predefinidos as a torrare a impostare s\'istadu predefinidu a pustis de s\'installatzione. + Sa modalidade de atzessibilidade est disabilitada in su sistema tuo. + Imprea su tempus de isetu de su sistema + Disabilitadu in sas impostatziones predefinidas. Si OsmAnd est traballende in primu pranu, s\'ischermu non s\'at a mòrrere. +\n +\nSi est abilitadu OsmAnd at a impreare sas impostatziones de istudadura de su sistema. + Isbòida sos datos registrados + Còpia sas coordinadas + Deretu a su puntu + Issèbera unu nùmene pro su profilu + Aberi sas impostatziones + Estensione disabilitada + S\'estensione est un\'aplicatzione a banda. L\'as a dèpere bogare a banda si non la cheres prus impreare. +\n +\nS\'estensione at a abarrare in su dispositivu a pustis de b\'àere bogadu OsmAnd. + Menù + %1$s — %2$s — %3$s + Càlculu de s\'àndala + Istile de renderizatzione personalizadu + Inclue datos additzionales + Su profilu importadu tenet datos additzionales. Incarca in \"Importa\" pro importare sos datos de su profilu ebbia o ischerta sos datos additzionales de importare. + Podes ischertare datos additzionales de esportare in paris cun su profilu. \ No newline at end of file From 6c26881a5cc77ebe1914160dcfaf9a4b89e5bacc Mon Sep 17 00:00:00 2001 From: Len Aye Date: Mon, 17 Feb 2020 10:00:20 +0000 Subject: [PATCH 079/120] Translated using Weblate (Burmese) Currently translated at 10.7% (341 of 3184 strings) --- OsmAnd/res/values-my/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-my/strings.xml b/OsmAnd/res/values-my/strings.xml index be686ece0f..0c5390199f 100644 --- a/OsmAnd/res/values-my/strings.xml +++ b/OsmAnd/res/values-my/strings.xml @@ -414,4 +414,6 @@ မြေပုံပေါ်တွင်ပုံပန်းသဏ္ဌာန် အနှစ်သက်ဆုံးအမျိုးအစား အဖွဲ့တစ်ဖွဲ့ထည့်ပါ + Settings ဖွင့်ပါ + %1$s — %2$s — %3$s \ No newline at end of file From f17e266d9eeba4bfc64d504de996390bd8c2fdbe Mon Sep 17 00:00:00 2001 From: Franco Date: Sun, 16 Feb 2020 11:43:57 +0000 Subject: [PATCH 080/120] Translated using Weblate (Spanish (American)) Currently translated at 100.0% (3184 of 3184 strings) --- OsmAnd/res/values-es-rUS/strings.xml | 65 +++++++++++++++++----------- 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index 0f90279350..19a9494eb8 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -32,7 +32,7 @@ ¿Limpiar el historial? ¿Mover los archivos de datos de OsmAnd al nuevo destino\? Almacenamiento del mapa - Lugares + Sitios Indica el tiempo de espera para permanecer en la pantalla de planificación de ruta. Iniciar la guía de giro-a-giro luego de… Ir @@ -40,7 +40,7 @@ Acción crear Acción modificar Acción borrar - Ediciones OSM + Ediciones de OSM h min Estacionamiento limitado hasta las @@ -764,7 +764,7 @@ Lon %2$s \n - Mapas vectoriales compactos disponibles de todo el planeta \n - Descarga de mapas por país o región directamente desde la aplicación \n - Posibilidad de superponer varias capas de mapa, como GPX o rutas de navegación, Puntos de Interés (PDI), Favoritos, curvas de nivel, paradas de transporte público, mapas adicionales con transparencia personalizable -\n - Búsqueda sin conexión de direcciones y lugares (PDI) +\n - Búsqueda sin conexión de direcciones y sitios (PDI) \n - Navegación sin conexión para distancias de rango medio \n - Modos de automóvil, bicicleta y peatón con opcional: \n - Cambio automático de modo diurno/nocturno @@ -791,7 +791,7 @@ Lon %2$s \n - Descarga ilimitada de mapas de países o regiones directamente desde la aplicación \n - Posibilidad de superponer varias capas de mapa, como GPX o rutas de navegación, Puntos de Interés, Favoritos, curvas de nivel, paradas de transporte público, mapas adicionales con transparencia personalizable \n -\n - Búsqueda sin conexión de direcciones y lugares (PDI) +\n - Búsqueda sin conexión de direcciones y sitios (PDI) \n - Rutas sin conexión para distancias de rango medio \n - Modos de automóvil, bicicleta y peatón con opcional: \n - Cambio automático de modo diurno/nocturno @@ -930,7 +930,7 @@ Lon %2$s Visibilidad Etiquetas Descripción - Indica el usuario y contraseña de OSM para subir archivos GPX. + Indica el nombre de usuario y contraseña de OSM para subir archivos GPX. Soporte Soporte de nuevas funciones Dona para ver nuevas funciones implementadas en la aplicación. @@ -1039,7 +1039,7 @@ Lon %2$s General Configura la pantalla y ajustes globales de la aplicación. Ajustes globales de la aplicación - Usuario de OSM + Nombre de usuario de OSM Necesario para envíos a OpenStreetMap.org. Contraseña de OSM Modo reposo @@ -1101,7 +1101,7 @@ Lon %2$s ¿Borrar %1$d Favoritos y %2$d grupos de Favoritos? Casa Amigos - Lugares + Sitios Otros Nombre Categoría @@ -1663,7 +1663,7 @@ Lon %2$s Número de filas en el panel %1$s Especifica el tipo de PDI. Días laborales - Lugares recientes + Sitios recientes Favoritos borrar Ahora, guardado como: %1$s @@ -1760,7 +1760,7 @@ Lon %2$s Objetos propuestos Leer más Novedades en - Ediciones OSM compartidas vía OsmAnd + Ediciones de OSM compartidas vía OsmAnd Bajo Alemán Macedonio Frisón @@ -2033,7 +2033,7 @@ Lon %2$s Almacenamiento de datos de OsmAnd (para mapas, archivos GPX, etc.): %1$s. Conceder permiso Permitir el acceso a la ubicación - Obtén direcciones y descubre lugares nuevos sin una conexión a Internet + Obtén direcciones y descubre sitios nuevos sin una conexión a Internet Millas/metros Obtener por %1$s Obtenga descargas ilimitadas de mapas, añadiendo actualizaciones semanales, diarias o incluso por hora. @@ -2261,9 +2261,10 @@ Lon %2$s \n • Ajusta el mapa a la dirección del movimiento (o brújula) \n • Muestra tu ubicación y la dirección hacia dónde miras \n • Comparte la ubicación para que tus amigos te encuentren -\n • Guarda lugares importantes en «Mis favoritos» -\n • Permite elegir como mostrar los nombres en el mapa: En inglés, local, u ortografía fonética -\n • Muestra teselas en línea especiales, vista satelital (de Bing), diferentes superposiciones como trazas de travesía/navegación GPX y capas adicionales con transparencia personalizable +\n • Guarda sitios importantes en «Mis favoritos» +\n • Permite elegir cómo mostrar los nombres en el mapa: En inglés, local, u ortografía fonética +\n • Muestra teselas en línea especiales, vista satelital (de Bing), diferentes superposiciones como trazas de travesía/navegación GPX y capas adicionales con transparencia personalizable +\n Esquí \nEl complemento de OsmAnd para el estilo del mapa invernal, muestra trazas con nivel de complejidad y alguna información adicional, como la ubicación de los ascensores y otras instalaciones invernales. Ciclismo @@ -2308,10 +2309,10 @@ Lon %2$s Vista del mapa \n • Muestra tu ubicación y orientación \n • (Opcional) Ajusta el mapa a la dirección del movimiento (o la brújula) -\n • Guarda lugares importantes en «Favoritos» +\n • Guarda sitios importantes en «Favoritos» \n • Muestra PDI (puntos de interés) a tu alrededor \n • Muestra teselas en línea especiales, vista satelital (de Bing), diferentes superposiciones como trazas de travesía/navegación GPX y capas adicionales con transparencia personalizable -\n • Permite elegir como mostrar los nombres en el mapa: en inglés, local, u ortografía fonética +\n • Permite elegir como mostrar los nombres en el mapa: en inglés, local, u ortografía fonética \n Uso de datos de OSM y Wikipedia \n • Información de alta calidad del mejor proyecto colaborativo del mundo @@ -2427,10 +2428,10 @@ Lon %2$s Mapillary Widget de Mapillary Permite realizar contribuciones rápidas a Mapillary. - Fotos a nivel de calle en línea para todos. Descubre lugares, colabora, captura el mundo. + Fotos a nivel de calle en línea para todos. Descubre sitios, colabora, captura el mundo. Añadir fotos Comparte tus imágenes a nivel de calle a través de Mapillary. - Fotos a nivel de calle para todos. Descubre lugares, colabora, captura el mundo. + Fotos a nivel de calle para todos. Descubre sitios, colabora, captura el mundo. Fotos en línea Sin fotos aquí. Instalar @@ -2470,7 +2471,7 @@ Lon %2$s Iniciar/parar navegación Un botón que inicia o detiene la navegación. Tiempo del búfer para el seguimiento en línea - Indica el tiempo que el búfer mantendrá los lugares para enviar sin conexión + Indica el tiempo que el búfer mantendrá los sitios para enviar sin conexión Las fotos de Mapillary solo están disponibles en línea. Reintentar Navega por el mapa y añade puntos @@ -2590,7 +2591,7 @@ Lon %2$s Añadir un grupo Importar grupos desde Favoritos o puntos de referencia GPX. ¡Crea marcadores del mapa! - Pulsa en «Lugares» y luego pulsa la bandera del marcador. + Pulsa en «Sitios» y luego pulsa la bandera del marcador. Importar grupos Importar grupos de Favoritos o puntos de referencia, como marcadores. Los marcadores descartados aparecerán en esta pantalla. @@ -2730,7 +2731,7 @@ Lon %2$s Elegir plan Comprar uno de los siguientes elementos para recibir la característica de la guía turística sin conexión: Elegir el elemento adecuado - Las guías de los lugares más interesantes del planeta, dentro de OsmAnd y sin conexión a Internet. + Las guías de los sitios más interesantes del planeta, dentro de OsmAnd y sin conexión a Internet. Guías turísticas Actualizaciones del mapa: cada mes Actualizaciones del mapa: cada hora @@ -2743,7 +2744,7 @@ Lon %2$s Wikipedia sin conexión Desbloquear todas las características de OsmAnd Nuevos datos disponibles de Wikiviajes, actualiza para disfrutar de ellos. - Descarga las guías turísticas de Wikiviajes para ver artículos sobre lugares alrededor del mundo, sin una conexión a Internet. + Descarga las guías turísticas de Wikiviajes para ver artículos sobre sitios alrededor del mundo, sin una conexión a Internet. Actualización disponible Descargar archivo La guía turística libre global que cualquiera puede editar. @@ -2994,7 +2995,7 @@ Lon %2$s Marca los tipos de transporte público a evitar para la navegación: Evitar tipos de transporte… modo %s - Sin empedrado y adoquinado + Sin empedrado ni adoquinado Evitar las calles empedradas y adoquinadas Grados Mil angular @@ -3440,7 +3441,7 @@ Lon %2$s Seguimiento en línea Precisión de registro Puedes encontrar todas tus trazas grabadas en «%1$s» o en la carpeta OsmAnd usando el administrador de archivos. - Puedes encontrar todas tus notas en «%1$s». + Puedes encontrar todas tus notas multimedia en «%1$s». Notas de video Notas fotográficas Recálculo de la ruta @@ -3479,7 +3480,7 @@ Lon %2$s Usar la aplicación del sistema Reproducir sonido al fotografiar Autorización exitosa - Reordenar las categorías + Reordenar categorías Puedes añadir categorías personalizadas, ocultar las categorías que no parezcan necesarias y cambiar el orden de clasificación de la lista. La lista puede ser importada y exportada con perfiles. Puedes añadir una nueva categoría personalizada marcando una o varias categorías necesarias. Restablecer al valor predefinido, restablecerá el orden de clasificación al estado predefinido después de la instalación. @@ -3496,7 +3497,7 @@ Lon %2$s Desactivado de forma predefinida, si OsmAnd se ejecuta en primer plano, la pantalla se mantendrá encendida. \n \nSi se activa, OsmAnd utilizará los ajustes de tiempo de espera del sistema. - Borrar datos grabados + Vaciar datos grabados • Perfiles: ahora puedes cambiar el orden, definir el icono para el mapa, cambiar todos los ajustes para los perfiles base y restaurarlos de nuevo a los valores predefinidos \n \n • Se han añadido los números de salida en la navegación @@ -3525,4 +3526,18 @@ Lon %2$s Copiar coordenadas Directo al punto Ordenar por categoría + Proporciona un nombre para el perfil + Abrir los ajustes + Complemento desactivado + Este complemento es una aplicación independiente, deberás quitarlo por separado si no piensas seguir usándolo. +\n +\nEl complemento permanecerá en el dispositivo después de desinstalar OsmAnd. + Menú + %1$s → %2$s → %3$s + Enrutamiento + Vista de estilo propia + Incluir datos adicionales + El perfil importado contiene datos adicionales. Pulsa en «Importar» para importar sólo datos de perfil o marca datos adicionales para importar. + Puedes marcar datos adicionales para exportar junto con el perfil. + Antártida \ No newline at end of file From 72f55ed7c57439aabf3e58c660e17f7fd6e0b93e Mon Sep 17 00:00:00 2001 From: Rpnpif Date: Sun, 16 Feb 2020 13:22:18 +0000 Subject: [PATCH 081/120] Translated using Weblate (French) Currently translated at 99.8% (3768 of 3772 strings) --- OsmAnd/res/values-fr/phrases.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-fr/phrases.xml b/OsmAnd/res/values-fr/phrases.xml index 04803224f4..9ee21a7144 100644 --- a/OsmAnd/res/values-fr/phrases.xml +++ b/OsmAnd/res/values-fr/phrases.xml @@ -234,7 +234,7 @@ Magasin d\'instruments de musique Réserve naturelle Base navale militaire - Quartier + Quartier de voisinage Marchand de journaux Entreprise de presse ONG @@ -667,7 +667,7 @@ Centre de formation Hockey sur gazon Zone fumeur - Quartier + Grand quartier Aire de repos Réservoir hydrique Itinéraire de patinage sur glace @@ -1694,7 +1694,7 @@ Poteau de ligne électrique Tour de refroidissement Pylône d\'éclairage - De l\'agriculture biologique + Organique Produits blancs Mercure Mousse de polystyrène @@ -3786,4 +3786,9 @@ Bowling Numéro de piste Base de chasse + monacal + canonique + Clercs réguliers + Stratovolcan + Vélo fantôme \ No newline at end of file From 5c14c906ec389e28118bde3a58eb58804f577590 Mon Sep 17 00:00:00 2001 From: Franco Date: Sun, 16 Feb 2020 15:19:44 +0000 Subject: [PATCH 082/120] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (3772 of 3772 strings) --- OsmAnd/res/values-es-rAR/phrases.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-es-rAR/phrases.xml b/OsmAnd/res/values-es-rAR/phrases.xml index 4f6bb88aa1..2b69d120a1 100644 --- a/OsmAnd/res/values-es-rAR/phrases.xml +++ b/OsmAnd/res/values-es-rAR/phrases.xml @@ -77,7 +77,7 @@ Tienda de informática Tienda de fotocopiado;Fotocopiadora Blanquería;Cortinas - Mercería + Tienda textil;Telas Tienda de ropa de cama Equipo de buceo Mejoras para el hogar @@ -133,7 +133,7 @@ Cuatriciclos;Concesionaria de cuatriciclos Cosméticos Mercado - Costuras;Telas + Mercería;Artículos de costura;Telas Policía Cuartel de bomberos Teléfono de emergencia From 3693600f7acaa9cc3bcfd78bceb04204fd9e6bac Mon Sep 17 00:00:00 2001 From: Franco Date: Sun, 16 Feb 2020 11:43:06 +0000 Subject: [PATCH 083/120] Translated using Weblate (Spanish (American)) Currently translated at 100.0% (3772 of 3772 strings) --- OsmAnd/res/values-es-rUS/phrases.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-es-rUS/phrases.xml b/OsmAnd/res/values-es-rUS/phrases.xml index 206bbf3a18..5b1531969c 100644 --- a/OsmAnd/res/values-es-rUS/phrases.xml +++ b/OsmAnd/res/values-es-rUS/phrases.xml @@ -77,7 +77,7 @@ Tienda de informática Tienda de fotocopiado;Fotocopiadora Blanquería;Cortinas - Mercería + Tienda textil;Telas;Mercería Tienda de ropa de cama Equipo de buceo Mejoras para el hogar @@ -133,7 +133,7 @@ Cuatriciclos;Concesionaria de cuatriciclos Cosméticos Mercado - Costuras;Telas + Artículos de costura;Telas;Mercería Policía Cuartel de bomberos Teléfono de emergencia @@ -2873,7 +2873,7 @@ Pizza Hamburguesas Café - Emparedados;Sándwich + Sándwich Kebab;Brochetas Pollo Helado From b40c473239a46115902048a542ee51787e03f9c2 Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Mon, 17 Feb 2020 15:25:27 +0000 Subject: [PATCH 084/120] Translated using Weblate (Sardinian) Currently translated at 100.0% (267 of 267 strings) Translation: OsmAnd/Telegram Translate-URL: https://hosted.weblate.org/projects/osmand/telegram/sc/ --- OsmAnd-telegram/res/values-sc/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd-telegram/res/values-sc/strings.xml b/OsmAnd-telegram/res/values-sc/strings.xml index cb4d03169f..9846061b82 100644 --- a/OsmAnd-telegram/res/values-sc/strings.xml +++ b/OsmAnd-telegram/res/values-sc/strings.xml @@ -267,4 +267,5 @@ Ùrtimu agiornamentu dae Telegram: %1$s a como Ùrtima risposta: %1$s a como %1$s a como + ERR \ No newline at end of file From 1d5a344fb10dfef96d473740330ef4ba41005886 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 17:36:09 +0100 Subject: [PATCH 085/120] Fix RP --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index d8cd72828e..32a6742dc8 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -1259,7 +1259,7 @@ public class RouteProvider { segments.add(lastAdded); } else { Location mp = MapUtils.calculateMidPoint(lastAdded, pl); - segments.add(0, mp); + points.add(0, mp); } } return new RouteCalculationResult(segments, null, params, null, false); From 298893ae1794ba01f80570559d0404678b0f1848 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 17:36:55 +0100 Subject: [PATCH 086/120] Fix RP --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 32a6742dc8..182eb909fc 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -1250,6 +1250,7 @@ public class RouteProvider { points.add(new Location("", l.getLatitude(), l.getLongitude())); } } + points.add(new Location("", params.end.getLatitude(), params.end.getLongitude())); Location lastAdded = points.poll(); segments.add(lastAdded); while(!points.isEmpty()) { From c419845b0c21ee5a6b00daeacaf6abaa202f717c Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:06:38 +0100 Subject: [PATCH 087/120] Clean up --- .../osmand/plus/routing/RoutingHelper.java | 21 ------ .../src/net/osmand/plus/views/RouteLayer.java | 68 +++++++------------ 2 files changed, 23 insertions(+), 66 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 532c5161f1..ea7c63bbf2 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -61,7 +61,6 @@ public class RoutingHelper { private List intermediatePoints; private Location lastProjection; private Location lastFixedLocation; - private Location originalStartingLocation; private RouteCalculationResult originalRoute = null; @@ -180,7 +179,6 @@ public class RoutingHelper { } public synchronized void setFinalAndCurrentLocation(LatLon finalLocation, List intermediatePoints, Location currentLocation){ - setOriginalStartLocation(currentLocation); checkAndUpdateStartLocation(currentLocation); RouteCalculationResult previousRoute = route; clearCurrentRoute(finalLocation, intermediatePoints); @@ -188,25 +186,6 @@ public class RoutingHelper { setCurrentLocation(currentLocation, false, previousRoute, true); } - public RouteCalculationResult getOriginalRoute() { - return originalRoute; - } - public List getOriginalRouteAllLoc() { - return originalRoute.getImmutableAllLocations(); - } - - public void setOriginalRoute(RouteCalculationResult originalRoute) { - this.originalRoute = originalRoute; - } - - private void setOriginalStartLocation(Location currentLocation) { - originalStartingLocation = currentLocation; - } - - public Location getOriginalStartingLocation() { - return originalStartingLocation; - } - public synchronized void clearCurrentRoute(LatLon newFinalLocation, List newIntermediatePoints) { route = new RouteCalculationResult(""); isDeviatedFromRoute = false; diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index f9aa43445f..3fded5825f 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -953,8 +953,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont } private void drawSegments(RotatedTileBox tb, Canvas canvas, double topLatitude, double leftLongitude, - double bottomLatitude, double rightLongitude, Location lastProjection, int currentRoute, boolean showOriginalRoute, - Location pointToReturn) { + double bottomLatitude, double rightLongitude, Location lastProjection, int currentRoute) { if (locations.size() == 0) { return; } @@ -969,26 +968,20 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont GeometryWayStyle style = defaultWayStyle; boolean previousVisible = false; - if (lastProjection != null) { - if (leftLongitude <= lastProjection.getLongitude() && lastProjection.getLongitude() <= rightLongitude - && bottomLatitude <= lastProjection.getLatitude() && lastProjection.getLatitude() <= topLatitude) { - addLocation(tb, lastProjection, style, tx, ty, angles, distances, 0, styles); - previousVisible = true; - } + Location lastPoint = lastProjection; + if (lastPoint != null) { + previousVisible = addPoint(tb, topLatitude, leftLongitude, bottomLatitude, rightLongitude, style, previousVisible, lastPoint); } - List routeNodes; - if (showOriginalRoute && helper.getOriginalRoute() != null && helper.getOriginalRouteAllLoc() != null) { - routeNodes = helper.getOriginalRouteAllLoc(); - } else { - routeNodes = locations; + Location sp = helper.getRoute().getCurrentStraightAnglePoint(); + if (sp != null) { + lastPoint = sp; + previousVisible = addPoint(tb, topLatitude, leftLongitude, bottomLatitude, rightLongitude, style, previousVisible, sp); } + List routeNodes = locations; int previous = -1; for (int i = currentRoute; i < routeNodes.size(); i++) { Location ls = routeNodes.get(i); style = getStyle(i, defaultWayStyle); - if (!showOriginalRoute && (simplification.getQuick(i) == 0 && !styleMap.containsKey(i))) { - continue; - } if (leftLongitude <= ls.getLongitude() && ls.getLongitude() <= rightLongitude && bottomLatitude <= ls.getLatitude() && ls.getLatitude() <= topLatitude) { double dist = 0; @@ -1019,6 +1012,15 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont drawRouteSegment(tb, canvas, tx, ty, angles, distances, 0, styles); } + private boolean addPoint(RotatedTileBox tb, double topLatitude, double leftLongitude, double bottomLatitude, double rightLongitude, GeometryWayStyle style, boolean previousVisible, Location lastPoint) { + if (leftLongitude <= lastPoint .getLongitude() && lastPoint .getLongitude() <= rightLongitude + && bottomLatitude <= lastPoint .getLatitude() && lastPoint .getLatitude() <= topLatitude) { + addLocation(tb, lastPoint, style, tx, ty, angles, distances, 0, styles); + previousVisible = true; + } + return previousVisible; + } + private void clearArrays() { tx.clear(); ty.clear(); @@ -1103,7 +1105,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont startLocation.setLatitude(start.getLatitude()); startLocation.setLongitude(start.getLongitude()); routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, - startLocation, 0, false, null); + startLocation, 0); } } else { @@ -1112,36 +1114,12 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont routeGeometry.clearTransportRoute(); routeGeometry.updateRoute(tb, route); RouteProvider.RouteService rs = helper.getRoute().getRouteService(); - if (directTo && helper.getOriginalStartingLocation() != null) { + if (directTo) { routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, - helper.getOriginalStartingLocation(), 0, true, null); + null, 0); } else { - Location currentLoc = helper.getLastProjection(); - int currentRoute = route == null ? 0 : route.getCurrentRoute(); - Location pointToReturn = null; - if (route != null && currentRoute > 0 && route.getRouteRecalcDistance() > 0) { -// Location currentLoc = helper.getApplication().getLocationProvider().getLastKnownLocation(); -// final Location from = routeGeometry.locations.get(currentRoute - 1);o -// final Location to = routeGeometry.locations.get(currentRoute); -// final LatLon projection = MapUtils.getProjection(currentLoc.getLatitude(), -// currentLoc.getLongitude(), from.getLatitude(), from.getLongitude(), -// to.getLatitude(), to.getLongitude()); -// -// final double deviation = MapUtils.getDistance(projection.getLatitude(), projection.getLongitude(), currentLoc.getLatitude(), currentLoc.getLongitude()); -// if (deviation < route.getRouteRecalcDistance()) { -// double distFromProjectionToEnd = Math.sqrt(Math.pow(to.getLatitude() - projection.getLatitude(), 2) + Math.pow(to.getLongitude() - projection.getLongitude(), 2)); -// double coef = deviation / distFromProjectionToEnd; -// pointToReturn = new Location("route_layer"); -// pointToReturn.setLatitude(projection.getLatitude() + (to.getLatitude() - projection.getLatitude()) * coef); -// pointToReturn.setLongitude(projection.getLongitude() + (to.getLongitude() - projection.getLatitude()) * coef); -// } -// if (pointToReturn != null) { -// drawProjectionPoint(canvas, new double[]{tb.getPixXFromLonNoRot(pointToReturn.getLongitude()), tb.getPixYFromLatNoRot(pointToReturn.getLatitude())}); -// } - } - routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, - helper.getLastProjection(), route == null ? 0 : route.getCurrentRoute(), false, pointToReturn); + helper.getLastProjection(), route.getCurrentStraightAngleRoute()); } List rd = helper.getRouteDirections(); Iterator it = rd.iterator(); @@ -1153,7 +1131,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont if (directTo) { //add projection point on original route double[] projectionOnRoute = calculateProjectionOnRoutePoint( - helper.getOriginalRouteAllLoc(), helper, tb); + helper.getRoute().getImmutableAllLocations(), helper, tb); if (projectionOnRoute != null) { drawProjectionPoint(canvas, projectionOnRoute); } From 49f901998d39aec34b54f4a971100a16a98e2e82 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:22:30 +0100 Subject: [PATCH 088/120] Clean up --- OsmAnd/res/values/strings.xml | 1 - .../net/osmand/access/AccessibilitySettingsFragment.java | 9 --------- OsmAnd/src/net/osmand/plus/views/RouteLayer.java | 2 ++ 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 722683d322..ce7ac1930e 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,7 +11,6 @@ Thx - Hardy --> - %s (Routing Default) App Default (%s) Please provide a name for the profile Disable recalculation diff --git a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java index 5b39741b61..7156fa6d75 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java +++ b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java @@ -172,15 +172,6 @@ public class AccessibilitySettingsFragment extends BaseSettingsFragment implemen autoAnnouncePeriod.setDescription(R.string.access_autoannounce_period_descr); } -// private void setupDisableOffRouteRecalculationPref() { -// SwitchPreferenceEx disableOffRouteRecalculation = (SwitchPreferenceEx) findPreference(settings.DISABLE_OFFROUTE_RECALC.getId()); -// disableOffRouteRecalculation.setDescription(getString(R.string.access_disable_offroute_recalc_descr)); -// } -// -// private void setupDisableWrongDirectionRecalculationPref() { -// SwitchPreferenceEx disableWrongDirectionRecalculation = (SwitchPreferenceEx) findPreference(settings.DISABLE_WRONG_DIRECTION_RECALC.getId()); -// disableWrongDirectionRecalculation.setDescription(getString(R.string.access_disable_wrong_direction_recalc_descr)); -// } private void setupDirectionStylePref() { RelativeDirectionStyle[] relativeDirectionStyles = RelativeDirectionStyle.values(); diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 3fded5825f..830425b018 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -1145,6 +1145,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont Location previousInRoute = null; Location nextInRoute = null; //need to change this code by fixing helper.route.getCurrentRoute() miscalculation + // TODO simplifiy all culation! if (helper.getRoute().getIntermediatePointsToPass() > 0) { for (int i = 1; i < routeNodes.size(); i++) { LatLon routePoint = new LatLon(routeNodes.get(i).getLatitude(), routeNodes.get(i).getLongitude()); @@ -1159,6 +1160,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont } if (nextInRoute != null && previousInRoute != null) { + final Location ll = view.getApplication().getLocationProvider().getLastKnownLocation(); final int aX = box.getPixXFromLonNoRot(ll.getLongitude()); final int aY = box.getPixYFromLatNoRot(ll.getLatitude()); From a09181fa12a6d896120d5ab8e3eddc927d9620b1 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:24:13 +0100 Subject: [PATCH 089/120] Clean up --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 3 +-- .../osmand/plus/measurementtool/MeasurementEditingContext.java | 2 -- OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 25fcca6266..ad0c91776a 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3282,8 +3282,7 @@ public class OsmandSettings { return customBooleanRoutingProps.get(attrName); } - public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 0.f){ - }.makeProfile(); + public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 0.f).makeProfile(); public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference("enable_osmc_routing", true).makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java index 48894acc74..945887616d 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementEditingContext.java @@ -353,8 +353,6 @@ public class MeasurementEditingContext { } } }; - params.routeRecalculationDistance - = application.getSettings().ROUTE_RECALCULATION_DISTANCE.getModeValue(snapToRoadAppMode); return params; } diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index ea7c63bbf2..c7d09976cf 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -1136,7 +1136,6 @@ public class RoutingHelper { params.fast = settings.FAST_ROUTE_MODE.getModeValue(mode); params.mode = mode; params.ctx = app; - params.routeRecalculationDistance = settings.ROUTE_RECALCULATION_DISTANCE.getModeValue(mode); boolean updateProgress = false; if (params.mode.getRouteService() == RouteService.OSMAND) { params.calculationProgress = new RouteCalculationProgress(); From 78a3c51696a42f2798a90068ff3c32c336362378 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:25:29 +0100 Subject: [PATCH 090/120] Clean up --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index ad0c91776a..1253b42d6d 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -451,7 +451,7 @@ public class OsmandSettings { public void copyProfilePreferences(ApplicationMode modeFrom, ApplicationMode modeTo, List profilePreferences) { for (OsmandPreference pref : profilePreferences) { - if (prefCanBeCopiedOrReset(pref) && !USER_PROFILE_NAME.getId().equals(pref.getId()) && !ROUTE_RECALCULATION_DISTANCE.getId().equals(pref.getId())) { + if (prefCanBeCopiedOrReset(pref) && !USER_PROFILE_NAME.getId().equals(pref.getId())) { CommonPreference profilePref = (CommonPreference) pref; if (PARENT_APP_MODE.getId().equals(pref.getId())) { if (modeTo.isCustomProfile()) { From efeab50c6c473bcb39aabb94213a0e2f3ca748c3 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:27:39 +0100 Subject: [PATCH 091/120] Clean up --- OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java | 2 -- OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java index bed0858ab5..72abccd60d 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationParams.java @@ -34,8 +34,6 @@ public class RouteCalculationParams { public RouteCalculationProgressCallback calculationProgressCallback; public RouteCalculationResultListener resultListener; - public float routeRecalculationDistance; - public interface RouteCalculationResultListener { void onRouteCalculated(RouteCalculationResult route); } diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index f7f2fc2570..c12536a721 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -56,7 +56,7 @@ public class RouteCalculationResult { protected List cacheAgreggatedDirections; protected List locationPoints = new ArrayList(); - // parmas + // params protected final ApplicationMode appMode; protected final RouteProvider.RouteService routeService; protected final double routeRecalcDistance; From 588c96ba514f7805cd620fd06ae9a627ee8e7a56 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:33:37 +0100 Subject: [PATCH 092/120] Fix npe --- OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index c12536a721..0921e5d518 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -1056,7 +1056,7 @@ public class RouteCalculationResult { info.directionInfoInd = -1; info.distanceTo = -1; info.directionInfo = null; - return null; + return info; } /*public */NextDirectionInfo getNextRouteDirectionInfoAfter(NextDirectionInfo prev, NextDirectionInfo next, boolean toSpeak) { From 13b3f16bca94b3ffb5734fe9cfed64b07e57022f Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:49:12 +0100 Subject: [PATCH 093/120] Fix infinite loop --- .../osmand/plus/routing/RoutingHelper.java | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index c7d09976cf..94dfecbab6 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -693,20 +693,27 @@ public class RoutingHelper { } if(nextPoint > 0) { - float bearingTo = currentLocation.bearingTo(routeNodes.get(nextPoint)); - Location mp = MapUtils.calculateMidPoint(routeNodes.get(nextPoint - 1), routeNodes.get(nextPoint)); - boolean found = false; - while (mp.distanceTo(routeNodes.get(nextPoint)) > 100) { + Location next = routeNodes.get(nextPoint); + Location prev = routeNodes.get(nextPoint - 1); + float bearingTo = currentLocation.bearingTo(next); + float bearingPrev = currentLocation.bearingTo(prev); + while (true) { + Location mp = MapUtils.calculateMidPoint(routeNodes.get(nextPoint - 1), routeNodes.get(nextPoint)); + if(mp.distanceTo(routeNodes.get(nextPoint)) <= 100) { + break; + } float bearingMid = currentLocation.bearingTo(mp); - if (Math.abs(MapUtils.degreesDiff(bearingMid, bearingTo)) <= ANGLE_TO_DECLINE) { - route.updateNextVisiblePoint(nextPoint, mp); - found = true; + boolean sharpTo = Math.abs(MapUtils.degreesDiff(bearingMid, bearingTo)) < ANGLE_TO_DECLINE; + boolean sharpPrev = Math.abs(MapUtils.degreesDiff(bearingMid, bearingPrev)) < ANGLE_TO_DECLINE; + if(sharpPrev) { + next = mp; + } else if(sharpTo){ + prev = mp; + } else { break; } } - if(!found) { - route.updateNextVisiblePoint(nextPoint, null); - } + route.updateNextVisiblePoint(nextPoint, next); } } @@ -922,7 +929,7 @@ public class RoutingHelper { if(l != null && l.hasSpeed()) { speed = l.getSpeed(); } - if(next != null) { + if(next != null && n.directionInfo != null) { next[0] = n.directionInfo.getTurnType(); } if(n.distanceTo > 0 && n.directionInfo != null && !n.directionInfo.getTurnType().isSkipToSpeak() && From 3af2136673c1809ceaf190cd42d1f6c54e413d41 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 18:52:59 +0100 Subject: [PATCH 094/120] Fix infinite loop --- .../osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index 57a3b70766..610776db99 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -1025,8 +1025,8 @@ public class MapInfoWidgetsFactory { text = exitInfo.getExitStreetName(); } - if (nextDirInfo.directionInfo.getRouteDataObject() != null) { - object = nextDirInfo.directionInfo.getRouteDataObject(); + if (directionInfo != null && directionInfo.getRouteDataObject() != null) { + object = directionInfo.getRouteDataObject(); showShield = true; } } From f0b3062ab8413619ba429a8750469b0d42ea692a Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 19:42:10 +0100 Subject: [PATCH 095/120] Fix issues --- .../osmand/plus/routing/RoutingHelper.java | 28 +++++++++++-------- .../src/net/osmand/plus/views/RouteLayer.java | 4 +++ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 94dfecbab6..10ededaa3a 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -299,6 +299,9 @@ public class RoutingHelper { return lastProjection; } + public Location getLastFixedLocation() { + return lastFixedLocation; + } public void addRouteDataListener(IRoutingDataUpdateListener listener) { updateListeners = updateListenersList(new ArrayList<>(updateListeners), listener, true); @@ -453,8 +456,10 @@ public class RoutingHelper { } // 3. Identify wrong movement direction Location next = route.getNextRouteLocation(); + boolean isStraight = + route.getRouteService() == RouteService.DIRECT_TO || route.getRouteService() == RouteService.STRAIGHT; boolean wrongMovementDirection = checkWrongMovementDirection(currentLocation, next); - if (allowableDeviation > 0 && wrongMovementDirection + if (allowableDeviation > 0 && wrongMovementDirection && !isStraight && (currentLocation.distanceTo(routeNodes.get(currentRoute)) > allowableDeviation)) { log.info("Recalculate route, because wrong movement direction: " + currentLocation.distanceTo(routeNodes.get(currentRoute))); //$NON-NLS-1$ isDeviatedFromRoute = true; @@ -686,7 +691,7 @@ public class RoutingHelper { int nextPoint = route.currentRoute; for (; nextPoint < routeNodes.size() - 1; nextPoint++) { float bearingTo = currentLocation.bearingTo(routeNodes.get(nextPoint)); - float bearingTo2 = currentLocation.bearingTo(routeNodes.get(nextPoint + 1)); + float bearingTo2 = routeNodes.get(nextPoint).bearingTo(routeNodes.get(nextPoint + 1)); if (Math.abs(MapUtils.degreesDiff(bearingTo2, bearingTo)) <= ANGLE_TO_DECLINE) { break; } @@ -695,20 +700,21 @@ public class RoutingHelper { if(nextPoint > 0) { Location next = routeNodes.get(nextPoint); Location prev = routeNodes.get(nextPoint - 1); - float bearingTo = currentLocation.bearingTo(next); - float bearingPrev = currentLocation.bearingTo(prev); + float bearing = prev.bearingTo(next); + double bearingTo = Math.abs(MapUtils.degreesDiff(bearing, currentLocation.bearingTo(next))); + double bearingPrev = Math.abs(MapUtils.degreesDiff(bearing, currentLocation.bearingTo(prev))); while (true) { - Location mp = MapUtils.calculateMidPoint(routeNodes.get(nextPoint - 1), routeNodes.get(nextPoint)); - if(mp.distanceTo(routeNodes.get(nextPoint)) <= 100) { + Location mp = MapUtils.calculateMidPoint(prev, next); + if(mp.distanceTo(next) <= 100) { break; } - float bearingMid = currentLocation.bearingTo(mp); - boolean sharpTo = Math.abs(MapUtils.degreesDiff(bearingMid, bearingTo)) < ANGLE_TO_DECLINE; - boolean sharpPrev = Math.abs(MapUtils.degreesDiff(bearingMid, bearingPrev)) < ANGLE_TO_DECLINE; - if(sharpPrev) { + double bearingMid = Math.abs(MapUtils.degreesDiff(bearing, currentLocation.bearingTo(mp))); + if(bearingPrev < ANGLE_TO_DECLINE) { next = mp; - } else if(sharpTo){ + bearingTo = bearingMid; + } else if(bearingTo < ANGLE_TO_DECLINE){ prev = mp; + bearingPrev = bearingMid; } else { break; } diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 830425b018..7de21eb4c0 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -1111,12 +1111,16 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont RouteCalculationResult route = helper.getRoute(); boolean directTo = route.getRouteService() == RouteProvider.RouteService.DIRECT_TO; + boolean straight = route.getRouteService() == RouteProvider.RouteService.STRAIGHT; routeGeometry.clearTransportRoute(); routeGeometry.updateRoute(tb, route); RouteProvider.RouteService rs = helper.getRoute().getRouteService(); if (directTo) { routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, null, 0); + } else if(straight){ + routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, + helper.getLastFixedLocation(), route.getCurrentStraightAngleRoute()); } else { routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, helper.getLastProjection(), route.getCurrentStraightAngleRoute()); From b1ab80663279ff48baaa6d22645f67cddc3520b2 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 17 Feb 2020 20:07:52 +0100 Subject: [PATCH 096/120] Fix straight_to --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 1 + .../osmand/plus/routing/RouteCalculationResult.java | 10 +++++++--- OsmAnd/src/net/osmand/plus/views/RouteLayer.java | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 1253b42d6d..b0dfce9d1a 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -3283,6 +3283,7 @@ public class OsmandSettings { } public final CommonPreference ROUTE_RECALCULATION_DISTANCE = new FloatPreference("routing_recalc_distance", 0.f).makeProfile(); + public final CommonPreference ROUTE_STRAIGHT_ANGLE = new FloatPreference("routing_straight_angle", 30.f).makeProfile(); public final OsmandPreference USE_OSM_LIVE_FOR_ROUTING = new BooleanPreference("enable_osmc_routing", true).makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 0921e5d518..94a56369d3 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -60,7 +60,7 @@ public class RouteCalculationResult { protected final ApplicationMode appMode; protected final RouteProvider.RouteService routeService; protected final double routeRecalcDistance; - protected final double routeVisibleAngle = 30; + protected final double routeVisibleAngle; // Note always currentRoute > get(currentDirectionInfo).routeOffset, // but currentRoute <= get(currentDirectionInfo+1).routeOffset @@ -73,8 +73,6 @@ public class RouteCalculationResult { protected Location currentStraightAnglePoint = null; - - public RouteCalculationResult(String errorMessage) { this.errorMessage = errorMessage; this.routingTime = 0; @@ -90,6 +88,7 @@ public class RouteCalculationResult { this.routeService = null; this.appMode = null; this.routeRecalcDistance = 0; + this.routeVisibleAngle = 0; } public RouteCalculationResult(List list, List directions, RouteCalculationParams params, List waypoints, boolean addMissingTurns) { @@ -126,8 +125,11 @@ public class RouteCalculationResult { this.routeService = params.mode.getRouteService(); if(params.ctx != null) { this.routeRecalcDistance = params.ctx.getSettings().ROUTE_RECALCULATION_DISTANCE.getModeValue(params.mode); + this.routeVisibleAngle = routeService == RouteProvider.RouteService.STRAIGHT ? + params.ctx.getSettings().ROUTE_STRAIGHT_ANGLE.getModeValue(params.mode) : 0; } else { this.routeRecalcDistance = 0; + this.routeVisibleAngle = 0; } } @@ -160,6 +162,8 @@ public class RouteCalculationResult { updateDirectionsTime(this.directions, this.listDistance); this.alarmInfo = Collections.unmodifiableList(alarms); this.routeRecalcDistance = ctx.getSettings().ROUTE_RECALCULATION_DISTANCE.getModeValue(mode); + this.routeVisibleAngle = routeService == RouteProvider.RouteService.STRAIGHT ? + ctx.getSettings().ROUTE_STRAIGHT_ANGLE.getModeValue(mode) : 0; } public ApplicationMode getAppMode() { diff --git a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java index 7de21eb4c0..874696db07 100644 --- a/OsmAnd/src/net/osmand/plus/views/RouteLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RouteLayer.java @@ -993,7 +993,9 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont } else if (lastProjection != null) { lt = lastProjection; } - addLocation(tb, lt, style, tx, ty, angles, distances, 0, styles); // first point + if(lt != null) { + addLocation(tb, lt, style, tx, ty, angles, distances, 0, styles); // first point + } } addLocation(tb, ls, style, tx, ty, angles, distances, dist, styles); previousVisible = true; @@ -1118,7 +1120,7 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont if (directTo) { routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, null, 0); - } else if(straight){ + } else if (straight) { routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, helper.getLastFixedLocation(), route.getCurrentStraightAngleRoute()); } else { From d943ca749a17d7e8a8bdb15fdf2ad391c66599a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Mon, 17 Feb 2020 18:16:37 +0000 Subject: [PATCH 097/120] Translated using Weblate (Turkish) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-tr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 3ddd51edcd..1dc8be3c72 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -3495,4 +3495,6 @@ İçe aktarılan profil ilave veriler içermektedir. Yalnızca profil verilerini içe aktarmak için İçe Aktar\'ı tıklayın veya içe aktarılacak ilave verileri seçin. Profil ile birlikte dışa aktarılacak ilave veriler seçebilirsiniz. Antarktika + Navigasyon talimatları ile navigasyon sırasında sistem bildirimini göster. + Navigasyon bildirimi \ No newline at end of file From 2beeea6762371d37105be6a31371867dec5d9fe9 Mon Sep 17 00:00:00 2001 From: BATHULA Date: Tue, 18 Feb 2020 06:13:33 +0000 Subject: [PATCH 098/120] Translated using Weblate (Telugu) Currently translated at 1.7% (56 of 3186 strings) --- OsmAnd/res/values-te/strings.xml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/OsmAnd/res/values-te/strings.xml b/OsmAnd/res/values-te/strings.xml index e5a1671601..f10628d696 100644 --- a/OsmAnd/res/values-te/strings.xml +++ b/OsmAnd/res/values-te/strings.xml @@ -38,4 +38,38 @@ సమయంలోగా చెల్లించకపోవుట తాత్కాలిక హడ్డులు ఎంచుకో తాత్కాలిక హద్దులు ఎన్నుకో + ఫైల్ నుండి దిగుమతి చేయండి + "రూటింగ్ ఫైలు దిగుమతి చేయండి" + ప్రొఫైల్ ను దిగుమతి చేయండి + చిత్ర పరిమాణం, ఆడియో మరియు వీడియో నాణ్యత + లాగిన్, పాస్‌వర్డ్, ఆఫ్‌లైన్ ఎడిటింగ్ + ప్రతిమ, రంగు మరియు పేరును ఎంచుకోండి + అప్లికేషన్ యొక్క వివరణాత్మక లాగ్లను తనిఖీ చేయండి మరియు భాగస్వామ్యం చేయండి + ఈ ఎంపికను ఉపయోగించడానికి అనుమతి అవసరం. + సిఫార్సు: ఏది నమోదు చేయబడుతుందో మరియు ఏది కాదు, ఈ ఫిల్టర్ ను ఆపివేయడం ఉత్తమం అని అంచనా వేయడం కష్టం. + అదనపు సమయం + వెబ్ చిరునామా + సందేశం + కనిష్ట వేగం + కనిష్ట ఖచ్చితత్వం + కనిష్ట స్థానభ్రంశం + సిస్టమ్ అనువర్తనాన్ని ఉపయోగించండి + కెమెరా షటర్ ధ్వని + ప్రమాణీకరణ విజయవంతమైంది + కేటగిరీలను తిరిగి అమర్చండి + అందుబాటులో + కస్టమ్ కేటగిరీ జోడించు + రాత్రిపూట మాత్రమే చూపించు + %1$s/%2$s + %1 $ s వద్ద సూర్యాస్తమయం + %1 $ s వద్ద సూర్యోదయం + మీ సిస్టమ్ లో యాక్సెసబిలిటీ మోడ్ డిసేబుల్ చేయబడింది. + సిస్టం స్క్రీన్ టైమ్ అవుట్ ను ఉపయోగించు + చెరిపివెయుట + దయచెసి మీ నామము తెలుపండి + మార్పులు చేర్పులు చెయుటకు తెరవండి + జాబితా + %1$s — %2$s — %3$s + రూటింగ్ + అదనపు డేటాని చేర్చు \ No newline at end of file From c9c8b96867b959389745a967611d216006ba357e Mon Sep 17 00:00:00 2001 From: Mr-Update Date: Mon, 17 Feb 2020 20:31:59 +0000 Subject: [PATCH 099/120] Translated using Weblate (German) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 7f4a275f55..cafb1faf65 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -3545,4 +3545,6 @@ Lon %2$s Aufzeichnungsteilung Direkt zum Punkt Geo-Intent \'%s\' konnte nicht analysiert werden. + Systembenachrichtigung während der Navigation mit Navigationsanweisungen anzeigen. + Navigations-Benachrichtigung \ No newline at end of file From fc01621c51ac69c1271571763661cae6cc44529f Mon Sep 17 00:00:00 2001 From: jan madsen Date: Mon, 17 Feb 2020 20:15:18 +0000 Subject: [PATCH 100/120] Translated using Weblate (Danish) Currently translated at 89.1% (2841 of 3186 strings) --- OsmAnd/res/values-da/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 36c7120fff..ca3511ff23 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -3500,4 +3500,5 @@ Repræsenterer område: %1$s x %2$s Medtag yderligere data Vælg yderligere data, der skal eksporteres sammen med profilen. Antarktis + Brugerdefineret renderingssstil \ No newline at end of file From dab935b8bf3978721ae77aadaffa9937cf3dbc89 Mon Sep 17 00:00:00 2001 From: Verdulo Date: Mon, 17 Feb 2020 20:06:12 +0000 Subject: [PATCH 101/120] Translated using Weblate (Esperanto) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-eo/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml index fb14ce2aa1..338bb33882 100644 --- a/OsmAnd/res/values-eo/strings.xml +++ b/OsmAnd/res/values-eo/strings.xml @@ -3521,4 +3521,6 @@ Indikas lokon: %1$s x %2$s" La enportata profilo enhavas kromajn datumojn. Frapetu “enporti” por enporti nur profilajn datumojn aŭ elektu kromajn datumojn por enporti. Vi povas elekti kromajn datumojn por elporti kune kun la profilo. Antarkto + Montri sisteman sciigon dum navigi montrantan instrukciojn turno-post-turno. + Sciigo dum navigado \ No newline at end of file From ff953ea4a09e3223afeafec0c451543fa812f3d2 Mon Sep 17 00:00:00 2001 From: Tymofij Lytvynenko Date: Mon, 17 Feb 2020 21:29:02 +0000 Subject: [PATCH 102/120] Translated using Weblate (Ukrainian) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-uk/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 9cde309317..632fd625d1 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -3530,4 +3530,6 @@ Імпортований профіль містить додаткові дані. Натисніть кнопку імпортувати, щоб імпортувати лише дані профілю або вибрати додаткові дані для імпорту. Ви можете вибрати додаткові дані для експорту разом із профілем. Антарктида + Показувати системне сповіщення з навігаційними вказівками під час навігації. + Навігаційне сповіщення \ No newline at end of file From ae65e0360b6f7f1e6516e866c9ee23cc188a4ab1 Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Tue, 18 Feb 2020 07:58:29 +0000 Subject: [PATCH 103/120] Translated using Weblate (Japanese) Currently translated at 99.1% (3159 of 3186 strings) --- OsmAnd/res/values-ja/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 8c376f08dd..50cfdb9ba6 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -1367,9 +1367,9 @@ POIの更新は利用できません タクシーのルート共有 トロリーバスでのルート バスでのルート - 描写の省略 - ルートの追加描写 - 描写の追加 + 非表示 + ルート + 詳細 交通機関の追加描写 その他のマップ属性 その他の要素 @@ -2611,7 +2611,7 @@ POIの更新は利用できません 追加しました 日付別OSMメモ グループの追加 - OSMで用いられるPOIの作成や変更、OSMメモを開いたり注釈を加えたり、記録したGPXファイルの提供などがおこなえます。 + OSM用のPOIの作成や変更、OSMメモを開いたり注釈を加えたりはもちろん、記録したGPXファイルをOSMへアップロードすることもできます。 通過済みにする GPXファイルに追加 現在地 From 3ba9789dc28448157d4650fe2f69b8cc276a70b1 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Tue, 18 Feb 2020 07:08:20 +0000 Subject: [PATCH 104/120] Translated using Weblate (Hebrew) Currently translated at 94.2% (3002 of 3186 strings) --- OsmAnd/res/values-he/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml index 6c2ccb9d10..624c8699c8 100644 --- a/OsmAnd/res/values-he/strings.xml +++ b/OsmAnd/res/values-he/strings.xml @@ -3412,7 +3412,7 @@ לאפס את הגדרות הפרופיל לבררת המחדל\? %1$s:‏ %2$s %1$s %2$s - הקובץ ‚%1$s’ אינו מכיל כללי ניווט, נא לבחור בקובץ אחר. + אין כללי ניווט ב־‚%1$s’. נא לבחור בקובץ אחר. סוג הקובץ אינו נתמך. עליך לבחור קובץ עם הסיומת %1$s. ייבוא מקובץ ייבוא קובץ ניווט @@ -3421,7 +3421,7 @@ גודל תמונה ואיכות שמע ווידאו שם כניסה, ססמה, עריכה בלתי מקוונת נא לבחור סמל, צבע ושם - לאפשר לך לשתף את המיקום הנוכחי באמצעות הקלטת המסלול. + מאפשר לשתף את המיקום הנוכחי באמצעות הקלטת המסלול. מעקב מקוון דיוק תיעוד ביומן הערות וידאו @@ -3440,7 +3440,7 @@ סידור הקטגוריות מחדש ניתן להוסיף קטגוריות מותאמות אישית, להסתיר קטגוריות שאינן נחוצות לך ולשנות את סדר הרשימה. ניתן לייבא את הרשימה ולייצא אותה עם פרופילים. ניתן להוסיף קטגוריה חדשה מותאמת אישית על ידי בחירה בקטגוריה נחוצה אחת או יותר. - איפוס לבררת מחדל ימחק קטגוריות מותאמות אישית ויאפס את הסדר למצב בררת המחדל כמו לאחר ההתקנה. + איפוס לבררת מחדל יחזיר את הסדר למצב בררת המחדל כמו לאחר ההתקנה. זמין הוספת קטגוריה מותאמת אישית הצגה רק בלילה From 7bbd39cdd4e3512bcc3d5b5400117212e9a629f0 Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Tue, 18 Feb 2020 07:08:04 +0000 Subject: [PATCH 105/120] Translated using Weblate (Italian) Currently translated at 90.4% (2881 of 3186 strings) --- OsmAnd/res/values-it/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index bf2127f637..389bbe618e 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -3256,7 +3256,7 @@ Rappresenta l\'area: %1$s x %2$s Lingua ed emissione Reimposta predefiniti Crea, importa, modifica profili - Ha effetto sull\'intera applicazione + Hanno effetto sull\'intera applicazione Copia da un altro profilo Accendi lo schermo Mappa durante la navigazione From 9171159cd19f18d0977a516bc98394abf0dc1bbc Mon Sep 17 00:00:00 2001 From: Softmap Date: Mon, 17 Feb 2020 20:50:42 +0000 Subject: [PATCH 106/120] Translated using Weblate (Arabic) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-ar/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index 92dc58ab32..a6a7adc819 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -3444,4 +3444,6 @@ %1$s — %2$s — %3$s أسلوب تقديم مخصص يحتوي ملف التعريف المستوردة على بيانات إضافية. انقر فوق \"استيراد\" لاستيراد بيانات ملف التعريف فقط أو حدد بيانات إضافية لاستيرادها. + عرض إشعارات النظام أثناء التنقل بالتوجيهات . + إشعار الملاحة \ No newline at end of file From aa1e5b3100b21266affc17ae2ac678ec7e052310 Mon Sep 17 00:00:00 2001 From: Ldm Public Date: Mon, 17 Feb 2020 19:41:33 +0000 Subject: [PATCH 107/120] Translated using Weblate (French) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-fr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 89876f271f..1978685660 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -3510,4 +3510,6 @@ représentant la zone : %1$s x %2$s Le profil importé contient des données supplémentaires. Cliquez sur Importer pour n\'importer que les données de profil ou sélectionnez des données supplémentaires à importer. Vous pouvez sélectionner des données supplémentaires à exporter en même temps que le profil. Antarctique + Pendant la navigation, afficher une notification système avec les directions. + Notification pendant la navigation \ No newline at end of file From 9503cf9b0ae8b24870eceb2781dec378bbb9709c Mon Sep 17 00:00:00 2001 From: iman Date: Mon, 17 Feb 2020 16:50:30 +0000 Subject: [PATCH 108/120] Translated using Weblate (Persian) Currently translated at 99.8% (3180 of 3186 strings) --- OsmAnd/res/values-fa/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index f4f3ffaece..ae74255508 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -1942,7 +1942,7 @@ حذف شدند مبدأ انتخاب نشده - هنگامی که فضای استفاده‌شده افزون بر فضای ذخیره‌سازی می‌شود، کلیپ‌ها جایگزین شود. + هنگامی که فضای استفاده‌شده افزون بر فضای ذخیره‌سازی می‌شود، کلیپ‌ها بازنویسی شود. مدت‌زمان کلیپ‌های ضبط‌شده را مشخص کنید. حجم فضای ذخیره‌سازی مقدار فضای قابل‌تصرف برای همهٔ کلیپ‌های ضبط‌شده را مشخص کنید. @@ -3566,4 +3566,7 @@ پروفایلِ درون‌بردی حاوی دادهٔ بیشتری است. «درون‌برد» را بزنید تا فقط دادهٔ پروفایل درون‌برد شود. «دادهٔ بیشتر» را انتخاب کنید تا آن را نیز درون‌برد کنید. می‌توانید دادهٔ بیشتری را انتخاب کنید تا همراه با پروفایل برون‌برد کنید. جنوبگان + اعلام + هنگام ناوبری راهنمای ناوبری را در اعلان‌ها نمایش می‌دهد. + اعلان ناوبری \ No newline at end of file From 3fa6b56b7e4b1cfca9b18fcf72e2193f4883de85 Mon Sep 17 00:00:00 2001 From: Ajeje Brazorf Date: Mon, 17 Feb 2020 16:35:37 +0000 Subject: [PATCH 109/120] Translated using Weblate (Sardinian) Currently translated at 99.1% (3159 of 3186 strings) --- OsmAnd/res/values-sc/strings.xml | 210 ++++++++++++++++++------------- 1 file changed, 125 insertions(+), 85 deletions(-) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 53a55af4d1..13a3acdf95 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -69,7 +69,7 @@ Preferre sas autostradas Perunu caminu a pagamentu Istransit sos caminos a pagamentu - Perunu caminu non apamentadu + Perunu caminu no apamentadu Istransit sos caminos non apamentados Perunu navile Istransit sos naviles @@ -77,7 +77,9 @@ Istransit sas autostradas Lìmite de pesu Dislinda su lìmite de pesu de sos veìculos. - Dae sa versione Android 4.4 (KitKat) in antis, sa cartella betza (%s) non si podet impreare prus. Cheres copiare totus sos datos in sa destinatzione noa\? Nota 1: sos datos antepostos tuos non at a èssere mudados (ma podent essere iscantzellados manualmente). Nota 2: in sa cartella noa non at a èssere possìbile cumpartzire sos datos intra OsmAnd e OsmAnd+. + Dae sa versione Android 4.4 (KitKat) in antis, sa cartella betza (%s) non si podet impreare prus. Cheres copiare totus sos datos in sa destinatzione noa\? +\n Nota 1: sos datos antepostos tuos non at a èssere mudados (ma podent essere iscantzellados manualmente). +\n Nota 2: in sa cartella noa non at a èssere possìbile cumpartzire sos datos intra OsmAnd e OsmAnd+. Copiende su documentu (%s) in sa destinatzione noa… Copiende sos datos de OsmAnd in (%s), sa destinatzione noa… Copiende sos datos de OsmAnd… @@ -140,7 +142,7 @@ Issèbera sa regione de ghia: USA, Europa, UK, Àsia e àteras. Giapone Annuntzia… - Imposta sos annùntzios pro sos nùmenes de sos caminos, sos avisos (firmadas fortzadas, dossos), sos annuntzios de s’autovelox, sos lìmites de lestresa. + Imposta sos annùntzios pro sos nùmenes de sos caminos, sos avisos (firmadas fortzadas, dossos), sos annuntzios de s’autovelox e sos lìmites de lestresa. Nùmenes de sos caminos (TTS) Lìmites de lestresa Autovelox @@ -176,7 +178,7 @@ Puntu Nùmene de su documentu GPX Documentu GPX sarvadu in {0} - Custa estensione ativat unu widget in sa mapa chi permitit de creare àndalas carchende in sa mapa, o de impreare o mudare documentos GPX esistentes, pro pianificare unu biàgiu e medire sa distantzia intre puntos diferentes. Sos resurtados podent èssere sarvados comente GPX, e ant a poder\'èssere impreados prus a tardu comente ghia. + Crea àndalas carchende in sa mapa, o de impreare o mudare documentos GPX esistentes, pro pianificare unu biàgiu e medire sa distantzia intre puntos diferentes. Sos resurtados podent èssere sarvados comente GPX de impreare prus a tardu comente ghia. Aina calcoladore de distàntzia e pianificatzione * Toca pro sinnare unu puntu. \n * Incarca e mantene incarcadu in sa mapa pro iscantzellare su puntu antepostu. @@ -239,10 +241,10 @@ Iscata una foto Iscata una foto Imprea s’aplicatzione de sistema pro sas fotografias. - S’estensione Dropbox ti permitit de sincronizare sas camineras e sas notas audio/video cun su contu tuo de Dropbox. + Sincroniza sas rastas e sas notas audio/video cun su contu tuo de Dropbox. Estensione Dropbox Muda s’òrdine - Pro praghere lea a cunsideru s\'acuistu de s’estensione \'Curvas de livellu\', pro sostènnere s’isvilupu imbeniente. + Pro praghere piga a cunsideru sa còmpora de s’estensione \'Curvas de livellu\', pro sostènnere s’isvilupu imbeniente. Estensione \"Curvas de livellu\" A dimanda\? Registra video @@ -462,7 +464,7 @@ Istile de sa mapa Cunfigura s’ischermu Corsias - Perunu caminu no asfaltadu + Perunu caminu no apamentadu Perunu traghetu Istransi… Camineras fluorescentes @@ -472,34 +474,27 @@ Abìlita\n modalidade \"de isfundu\" Firma\n modalidade \"de isfundu\" Sighidu - OsmAnd (OSM Automated Navigation Directions - Indicatziones de Navigatzione Automàticas) + OsmAnd (OSM Automated Navigation Directions - Indicatziones de Navigatzione Automàticas) +\n +\nOsmAnd est un aplicatzione pro sa navigatzione chi impreat sa cantidade manna de datos a mitza aberta de OSM. Totu sas mapas (vetoriales o a tasseddos) podent èssere sarvadas in s’ischeda de su telèfono pro èssere impreadas chene lìnia. OsmAnd frunit fintzas sa funtzionalidade de su càlculu de s’àndala in lìnia (online) e chene lìnia (offline) cun una boghe de ghia, bortada pro bortada, incluida. +\n +\nCalicuna de sas caraterìsticas printzipales: +\n - Funtzionalidade intrea chene lìnia (Sarva sas mapas vetoriales o a tasseddos in sa memòria de su dispositivu) +\n - Mapas chene lìnia cumpatas iscarrigàbiles pro totu su mundu +\n - Iscarrigamentu de sas mapas de regiones o istados diretamente dae sa mapa +\n - Possibilidade de subrapositzione de istratos diferentes, comente a rastas GPX o de navigatzione, puntos de interesse, preferidos, curvas de livellu, firmadas de sos trasportos pùblicos, mapas annangàbiles cun trasparentzia personalizàbile +\n - Chirca chene lìnia pro indiritzos e logos (PDI) +\n - Càlculu de s’àndala pro distàntzias mèdias +\n - Modalidades màchina, bitzicleta, e a pede cun: +\n - Muda automàtica optzionale de sa vista die/note +\n - Ismanniamentu automàticu optzionale regoladu dae sa lestresa +\n - Alliniamentu de sa mapa regoladu sighinde sa diretzione o sa bùssola +\n - Indicadore de corsia optzionale, sinnalatzione de su lìmite de lestresa, boghes registradas e sintetizadas (TTS) \n -\nOsmAnd est un aplicatzione pro sa navigatzione chi impreat sa cantidade manna de datos a mitza aberta de OpenStreetMap (OSM). Totu sas mapas (vetoriales o a tasseddos) podent èssere sarvadas in s’ischeda de su telèfono pro èssere impreadas chene lìnia. OsmAnd frunit fintzas sa funtzionalidade de su càlculu de s’àndala in lìnia (online) e chene lìnia (offline) cun una boghe de ghia, bortada pro bortada, incluida. -\n -\nCalicuna de sas caraterìsticas printzipales: +\n Limitatziones de custa versione de badas de OsmAnd: +\n - Nùmeru limitadu de iscarrigamentu de mapas +\n - Atzessu a Wikipedia pro sos PDI chene lìnia chi mancat \n -\n- Funtzionalidade intrea chene lìnia (Sarva sas mapas vetoriales o a tasseddos in sa memòria de su dispositivu) -\n -\n- Mapas chene lìnia cumpatas iscarrigàbiles pro totu su mundu -\n -\n- Iscarrigamentu de sas mapas de regiones o istados diretamente dae sa mapa -\n -\n- Possibilidade de subrapositzione de istratos diferentes, comente a rastas GPX o de navigatzione, puntos de interesse, preferidos, curvas de livellu, firmadas de sos trasportos pùblicos, mapas annangàbiles cun trasparentzia personalizàbile -\n -\n- Chirca chene lìnia pro indiritzos e logos (PDI) -\n -\n- Càlculu de s’àndala pro distàntzias mèdias - Modalidades màchina, bitzicleta, e a pede cun: -\n -\n- Muda automàtica optzionale de sa vista die/note - Ismanniamentu automàticu optzionale regoladu dae sa lestresa -\n -\n- Alliniamentu de sa mapa regoladu sighinde sa diretzione o sa bùssola - Indicadore de corsia optzionale, sinnalatzione de su lìmite de lestresa, boghes registradas e sintetizadas (TTS) -\n -\nLimitatziones de custa versione de badas de OsmAnd: -\n -\n- Nùmeru limitadu de iscarrigamentu de mapas -\n -\n- Atzessu a Wikipedia pro sos PDI chene lìnia chi mancat -\n \nOsmAnd est totora in fase de isvilupu e su progetu nostru e su progressu suo andat a in antis gràtzias a sos contributos finantziàrios pro s’isvilupu e s’iscumprou (sa proa) de funtzionalidades noas. Pro praghere cunsidera s’optzione de comporare OsmAnd+, de finantziare funtziones didlindadas noas o de fàghere una donatzione generale a https://osmand.net. Albanesu Àrabu @@ -510,21 +505,24 @@ Àndalas metropolitana OsmAnd+ (OSM Automated Navigation Directions - Indicatziones de Navigatzione Automàticas) \n -\nOsmAnd+ est unu aplicatzione a mitza aberta pro sa navigatzione chi tènet atzessu a sa variedade manna de datos globales de Openstreetmap (OSM). Totu sas mapas (vetoriales o a tasseddos) podent èssere sarvadas in sa memòria de su telèfono pro èssere impreadas chene lìnia. OsmAnd frunit fintzas una funtzione de navigatzione cun ghia vocale in lìnia e chene lìnia. +\n OsmAnd+ est unu aplicatzione a mitza aberta pro sa navigatzione chi tènet atzessu a sa variedade manna de datos globales de OSM. Totu sas mapas (vetoriales o a tasseddos) podent èssere sarvadas in sa memòria de su telèfono pro èssere impreadas chene lìnia. OsmAnd frunit fintzas una funtzione de navigatzione cun ghia vocale in lìnia e chene lìnia. \n -\nOsmAnd+ est sa versione a pagamentu, comporende·la suportas su progetu, finàntzias s’isvilupu de funtzionalidades noas, e retzis totu sos ùrtimos agiornamentos. +\n OsmAnd+ est sa versione a pagamentu, comporende·la suportas su progetu, finàntzias s’isvilupu de funtzionalidades noas, e retzis totu sos ùrtimos agiornamentos. \n -\nCalicuna de sas funtzionalidades printzipales: -\n- Funtzionalidade intrea chene lìnia (sarva mapas vetoriales o a tasseddos in sa memòria de su dispositivu) -\n- Mapas cumpatas chene lìnia disponìbiles pro totu su mundu -\n- Iscarrigamentu chene lìmites de mapas de regiones e istados deretamente dae s’aplicatzione -\n- Funtzionalidade chene lìnia de Wikipedia (isgàrriga PDI Wikipedia), òtima pro giros turìsticos -\n- Possibilidade de subrapònnere istratos diferentes de mapas, comente a rastas GPX o de navigatzione, Puntos De Interesse, preferidos, curvas de livellu, firmadas de sos trasportos pùblicos, mapas aditzionales cun trasparèntzia personalizàbile +\n Calicuna de sas funtzionalidades printzipales: +\n - Funtzionalidade intrea chene lìnia (sarva mapas vetoriales o a tasseddos in sa memòria de su dispositivu) +\n - Mapas cumpatas chene lìnia disponìbiles pro totu su mundu +\n - Iscarrigamentu chene lìmites de mapas de regiones e istados deretamente dae s’aplicatzione +\n - Funtzionalidade chene lìnia de Wikipedia (isgàrriga PDI Wikipedia), òtima pro giros turìsticos +\n - Possibilidade de subrapònnere istratos diferentes de mapas, comente a rastas GPX o de navigatzione, Puntos De Interesse, preferidos, curvas de livellu, firmadas de sos trasportos pùblicos, mapas aditzionales cun trasparèntzia personalizàbile \n -\n- Chirca chene lìnia pro indiritzos e logos (PDI) - Càlculu de s’àndala chene lìnia pro distàntzias mèdias -\n- Modalidades in màchina, bitzicleta, e a pede cun: - muda automàtica optzionale de sa vista die/note -\n- Ismanniamentu automàticu optzionale regoladu dae sa lestresa -\n- Alliniamentu de sa mapa regoladu dae sa diretzione o dae sa bùssola - indicadore de corsia optzionale, sinnalatzione de su lìmite de lestresa, boghes registradas e sintetizadas (TTS) +\n - Chirca chene lìnia pro indiritzos e logos (PDI) +\n - Càlculu de s’àndala chene lìnia pro distàntzias mèdias +\n - Modalidades in màchina, bitzicleta, e a pede cun: +\n - Càmbiu automàticu optzionale de sa vista die/note +\n - Ismanniamentu automàticu optzionale regoladu dae sa lestresa +\n - Alliniamentu de sa mapa regoladu dae sa diretzione o dae sa bùssola +\n - Indicadore de corsia optzionale, sinnalatzione de su lìmite de lestresa, boghes registradas e sintetizadas (TTS) \n Datos PDI Datos PDI @@ -534,7 +532,7 @@ Agiorna PDI Carrigamentu PDI… PDI - PDI/Notas sarvados in su dispositivu + PDI/notas de OSM sarvados/as in su dispositivu PDI Wikipedia mondiale Ismanniende podes agiornare sos PDI Caraterìsticas de su disinnu @@ -571,7 +569,7 @@ Memòria allocata %1$s MB (lìmite de Android %2$s MB, Dalvik %3$s MB). Memòria allocata Memòria nativa totale allocada dae s’aplicu %1$s MB (Dalvik %2$s MB, àteru %3$s MB). -Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB). +\n Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB). Memòria nativa locale Puntu de tzucada tropu distante dae su caminu prus a curtzu. Positzione cumpartzida @@ -588,8 +586,8 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).PM AM Logu de parchègiu - S’estensione positzione parchègiu ti permìtit de registrare in ue est istada parchegiada sa màchina tua, e cantu tempus tenes galu (si su parchègiu tenet unu tempus limitadu). -\nPodes agatare su logu e su tempus de parchègiu in unu widget in sa mapa. Podes annànghere notìficas in su calendàriu pro ti l\'ammentare. + Ti permitet de registrare in ue est istada parchegiada sa màchina tua, e fintzas cantu tempus de parchègiu tenes galu. +\n Podes agatare su logu e su tempus de parchègiu in su pannellu de controllu e in unu widget in sa mapa. Podes annànghere notìficas in su calendàriu de Android pro ti l\'ammentare. Positzione parchègiu Marca comente logu de parchègiu Pùblicu @@ -624,7 +622,7 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Imprea sas mapas in lìnia (iscàrriga e archìvia sos tasseddos in s’ischeda de memòria). Mapas in lìnia Ischerta sas mitzas de sas mapas in lìnia o de sos tasseddos in cache. - Custa estensione permitit de impreare sas funtzionalidades pro s\'atzessibilidade de su dispositivu detetamente in OsmAnd, e fatzilitat, pro nàrrere, sa modìfica de sa lestresa de sas boghes de sìntesi vocale, sa cunfiguratzione de su movimentu de s\'ischermu, s’impreu de una trackball pro s\'ismanniamentu o de un’interfàtzia vocale pro cosas comente s\'annùntziu de sa positzione tua. + Permitit de impreare sas funtzionalidades pro s\'atzessibilidade de su dispositivu ditetamente in OsmAnd, e fatzilitat, pro nàrrere, sa modìfica de sa lestresa de sas boghes de sìntesi vocale, sa cunfiguratzione de su movimentu de s\'ischermu, s’impreu de una trackball pro s\'ismanniamentu o de un’interfàtzia vocale pro cosas che s\'annùntziu de sa positzione tua. Estensiones Sas estensiones abìlitant funtzionalidades agiuntivas e impostatziones avantzadas. Estensiones @@ -754,17 +752,17 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Atzione {0} acabbada. Gratzias pro s’impreu de OsmAnd. Iscàrriga sos datos regionales pro s\'impreu chene lìnia dae \'Impostatziones\'→\'Amministra sos documentos de sas mapas\'. A pustis at a èssere possìbile ammustrare mapas, chircare indirìtzos, PDI, e agatare trasportos pùblicos. Sa mapa de base netzessària pro su funtzionamentu est in sa lista de iscarrigamentu. - Custa estensione ammustrat sas impostatziones pro funtzionalidades pro isvilupu e debug comente sa simulatzione de sa navigatzione, sa visualizatzione de sa prestatzione de sa renderizatzione, o s\'interfache vocale. Custas impostatziones sunt pensadas pro sos isvilupadores e non sunt netzessàrias pro sos àteros impreadores. + Impostatziones pro funtzionalidades pro s\'isvilupu e sa puificatzione (debug), che a sa simulatzione de sa navigatzione, sas prestatziones de sa renderizatzione, o s\'interfache vocale. Custas impostatziones sunt pensadas pro sos isvilupadores e non sunt netzessàrias pro s\'impreu normale. Sas mapas vetoriales diat dèpere apàrrere in manera prus lestra. In carchi dispositivu diat podere funtzionare male. Una notìfica pro recuperare sa màchina est istada annangada a su tzeravallu/calendàriu tuo, e podet èssere modificada o bogada dae cue. Faghe divènnere transparentes totu sas caraterìsticas de sas àreas de su terrinu. Aumenta sa cantidade ammustrada de minujos de sa mapa. - Cun custa estensione podes atzèdere a medas castas de màpas in lìnia (cussas connotas comente \"a tasseddos\" o \"raster\"), dae sas predefinidas de Openstreetmap (comente Mapnik) a sas immàgines satellitares e a sos istratos pro punnas ispetziales comente sas mapas metereològicas, climàticas, geològicas, e umbradura de sos rilievos etc. + Atzede a medas castas de màpas in lìnia (cussas connotas comente \"a tasseddos\" o \"raster\"), dae sas predefinidas de OSM (che a Mapnik) a sas immàgines satellitares e a sos istratos pro punnas ispetziales comente sas mapas metereològicas, climàticas, geològicas, e umbradura de sos rilievos etc. \n -\nTotu custas mapas podent èssere impreadas siat comente mapa printzipale (de base) de ammustrare in sa mapa de OsmAnd siat comente un\'istratu se subrapositzione o de isfundu de un’àtera mapa de base (comente sas mapas regulares non in lìnia de OsmAnd). Pro permìtere una visibilidade prus manna de sas mapas de isfundu, calicunu de sos elementos de sas mapas vetoriales podet èssere cuadu, impreende su menù \'Cunfigura sa mapa\' sighinde sas netzessidades tuas. +\nTotu custas mapas podent èssere impreadas siat comente mapa printzipale (de base) de ammustrare in sa mapa siat comente un\'istratu se subrapositzione o de isfundu de un’àtera mapa de base (che a sas mapas regulares non in lìnia de OsmAnd). Unos cantos de sos elementos de sas mapas vetoriales si podent cuare, impreende su menù \'Cunfigura sa mapa\', pro fàghere in manera chi sas mapas de isfundu siant prus visìbiles. \n -\nSas mapas a tasseddos podent èssere iscarrigadas deretamente o ammaniadas pro s\'impreu chene lìnia (e a pustis copiadas intre sa cartella de sos datos de OsmAnd) comente unu database SQLite chi podet èssere produidu dae medas ainas pro sa creatzione de mapas esternas (third-party maps). - Custa estensione permitit de cuntribuire ad OSM creende e modifichende sos PDI de OSM, aberinde e cummentende notas de OSM e imbiende documentos GPX registrados. OSM est unu progetu pùblicu de mapadura fatu dae una comunidade globale. Pro àteras informatziones: https://openstreetmap.org. Sa partetzipatzione est apretziada, e sas cuntributziones podent èssere fatas deretamente dae OsmAnd insertende in intro de s\'aplicu sas credentziales de atzessu. +\nIscàrriga sas mapas a tasseddos diretamente in lìnia, o ammaniadas pro s\'impreu chene lìnia (copiadas manualmente in sa cartella de sos datos de OsmAnd) che unu database SQLite chi podet èssere produidu dae medas ainas pro sa creatzione de mapas esternas (third-party maps). + Permitit de cuntribuire ad OSM creende e modifichende sos PDI de OSM, aberinde e cummentende notas de OSM e imbiende documentos GPX registrados in OsmAnd frunende su nùmene de impreadore e sa crae de intrada tuos. OpenStreetMap.org est unu progetu de domìniu pùblicu de mapadura fatu dae una comunidade globale. Ischerta una boghe e proa·la riproduinde annùntzios: Proa sos cumandos vocales Iscàrriga una mapa vetoriale pro custa positzione in \'Impostatziones\' (\'Amministra sos documentos de sas mapas\'), o cola a s\'estensione \'Mapas in lìnia\'. @@ -796,11 +794,11 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Modìficas chene lìnia Imprea semper sa modìfica chene lìnia. Sa modìficas de sos PDI intre s’aplicatzione non tenent efetos in sas mapas iscarrigadas, sunt imbetzes sarvadas in su dispositivu. - {0} sos PDI/Notas sunt istados carrigados + {0} PDI/notas carrigados/as Càrriga sa modìfica in OSM Iscantzella sa modìfica Muda asìncrona de OSM: - Ammustra e amministra sos PDI/Notas OSM in intro de su database in su dispositivu. + Ammustra e amministra sos PDI/ sas notas OSM in intro de su database de su dispositivu. Dislinda s’intervallu de s’arrastamentu in lìnia. Intervallu de s’arrastamentu in dereta (in lìnia) Dislinda s’indiritzu ìnternet cun sa sintassi de sos paràmetros: lat={0}, lon={1}, data/ora={2}, hdop={3}, artària={4}, lestresa={5}, àngulu={6}. @@ -812,11 +810,12 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Definidu dae s’impitadore Esistint giai documentos cun preferidos esportados. Los boles remplasare? Amministra sos documentos de sas mapas - Netzessàriu pro imbiare contributos a openstreetmap.org. + Netzessàriu pro sos contributos a openstreetmap.org. Modalidade de isfundu OsmAnd sighit a funtzionare in s’isfundu, cun s’ischermu mortu. Non b\'est memòria bastante pro iscarrigare %1$s MB (lìberos: %2$s). - Iscarrigare {0} documentu(os)\? {1} MB (de {2} MB) s\'ant a prenare. + Iscarrigare {0} documentu(os)\? +\n{1} MB (de {2} MB) s\'ant a prenare. Tema transparente Sa libreria nativa no est suportada dae custu dispositivu. Inizializatzione libreria nativa… @@ -906,7 +905,7 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Mapa subraposta Issèbera sa mapa de subrapositzione Sa mapa est giai installata, sas \'Impostatziones\' ant a èssere agiornadas. - Issèbera sas mapas (tasseddos) da installare o agiornare. + Issèbera sas mapas (a tasseddos) de installare o agiornare. Impossìbile fàghere custa operatzione chene una connessione a ìnternet. Installa àteru… Imprea sas mapas vetoriales pro totu su chi b\'est a in antis de custu livellu. @@ -1192,10 +1191,10 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Cumpridu Imprea ìnternet pro calculare un\'àndala. Imprea s’ingendradore de àndalas in lìnia - Dislinda sas impostatziones OpenStreetMap.org (OSM) netzessàrias pro contribuire a OSM. + Dislinda sas impostatziones de OpenStreetMap.org (OSM) netzessàrias pro contribuire a OSM. Dislinda sa limba, iscàrriga/torra a carrigare sos datos. Datos - Modìficas de OpenStreetMap + Modìfica de OpenStreetMap Impostatziones agiuntivas Impostatziones Sarva como sa rasta currente comente unu documentu GPX. @@ -1220,13 +1219,13 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Bisura mapa 3D Ammustra s\'ùrtimu istratu superiore de sos PDI impreadu. Ammustra s\'istratu de sos PDI - Issèbera sa mitza pro sos tasseddos in lìnia o in cache + Issèbera sa mitza pro sos tasseddos in lìnia o in sa memòria temporànea (cache). Mitza de sos tasseddos in lìnia Mitza mapa Imprea ìnternet Ammustra sa positzione tua Ammustra coordinadas GPS in sa mapa - Iscàrriga tasseddos fartantes de sa mapa + Iscàrriga sos tasseddos fartantes de sa mapa Aplicatzione de navigatzione Essi Chirca @@ -1243,7 +1242,7 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).A pede In tzentru In bassu - Insertare latitùdine & longitùdine in su formadu (G - grados, M - minutos, S - segundos) + Inserta sa latitùdine e sa longitùdine in su formadu ischertadu (G - grados, M - minutos, S - segundos) Latitùdine Longitùdine DDD.DDDDD @@ -1304,7 +1303,7 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Ammustra prus minujas in sa mapa Ammustra carchi minuja de sas mapas vetoriales (caminos etc.) fintzas a sos livellos de ismanniamentu prus bassos. Minujas de s\'àndala - Non allonghiare (ne inghelare) sos tasseddos de sa mapa in sos dispositivos a carchesa arta. + No allònghies (ne isfoches) sos tasseddos de sa mapa in sos dispositivos a densidade arta. Arrastat sa positzione tua cando s’ischermu est istudadu. Su servìtziu de navigatzione de isfundu de OsmAnd netzèssitat de su sistema de positzionamentu ativadu. Puntos de coladòrgiu @@ -1436,16 +1435,16 @@ Memòria in proportzione %4$s MB (lìmite de Android %5$s MB, Dalvik %6$s MB).Depes èssere connessu in lìnia pro installare custa estensione. Iscàrriga Vista mapa nàutica - Pro bìdere sas mapas ispetziales pro s’iscì, depent èssere iscarrigadas + Iscàrriga sa mapa ispetziale non in lìnia pro ammustrare sos impiantos pro s’iscì. Vista mapa iscì - Pro bìdere sas mapas ispetziales nàuticas, depent èssere iscarrigadas + Iscàrriga sa mapa ispetziale non in lìnia pro ammustrare sos detàllios nàuticos. Pista abbatigada Lìbera %1$s Memòria dispositivu Pistas de iscì Caminos ebbia Relògiu - Notas + Notas àudio/vìdeu Mapa in lìnia Cumpartzi sa nota Esporta @@ -1906,13 +1905,18 @@ Lon %2$s Abbonamentu OsmAnd LIve Serbit pro t\'agiornare a pitzu de sas contributziones tuas. Regione de suportu - Custu abbonamentu abilitat agiornamentos ora pro ora pro totu sas mapas de su mundu. Parte de su balàngiu suportat sa comunidade OSM e est pagadu pro cada contributu OSM. Si istimas OsmAnd e OSM e los boles suportare e èssere suportadu dae issos, custa est una manera perfeta pro lu fàghere. + Custu abbonamentu abilitat agiornamentos ora pro ora pro totu sas mapas de su mundu. +\nParte de su balàngiu suportat sa comunidade OSM e est pagadu pro cada contributu OSM. +\nSi istimas OsmAnd e OSM e los boles suportare e èssere suportadu dae issos, custa est una manera perfeta pro lu fàghere. Ischerta marcadore mapa Àteros marcadores Imbia anonimamente Ammustra sa barra de chirca trasparente - Non tènes ispàtziu bastante! Diant èssere netzessàrios {3} MB temporaneamente e {1} MB permanentemente. ({2} MB ebbia disponìbiles.) - Iscarrigare {0} documentu(os)\? Bi sunt {3} MB impreados temporaneamente e {1} MB permanentemente. (De {2} MB.) + Non tènes ispàtziu bastante! +\nDiant èssere netzessàrios {3} MB temporaneamente e {1} MB permanentemente. +\n({2} MB ebbia disponìbiles.) + Iscarrigare {0} documentu(os)\? +\nBi sunt {3} MB impreados temporaneamente e {1} MB permanentemente. (De {2} MB.) Càrriga sas notas OSM tuas anonimamentes o impreende su profilu OpenStreetMap.org tuo. Càrriga nota OSM Primu marcadore mapa @@ -1932,7 +1936,7 @@ Lon %2$s Annanghe sos marcadores mapa dae sa mapa Perunu puntu de coladòrgiu agatadu Raportu - Su nùmene de su documentu cuntennit caràteres non permitidos + Su nùmene de su documentu tenet caràteres non permitidos Fine Mèdia Grussu @@ -2127,13 +2131,13 @@ Lon %2$s Nùmene predefinidu Unu butone pro annànghere unu marcadore in su tzentru de sa mapa. Unu butone pro annànghere unu puntu de coladòrgiu GPX in su tzentru de sa mapa. - Unu butone pro annànghere una nota àudio in su tzentru de s\'ischermu. + Unu butone pro annànghere una nota sonora in su tzentru de s\'ischermu. Unu butone pro annànghere una nota vìdeu in su tzentru de s\'ischermu. Unu butone pro annànghere una nota fotogràfica in su tzentru de s\'ischermu. Unu butone pro annànghere una nota de OSM in su tzentru de s\'ischermu. Unu butone pro annànghere unu PDI in su tzentru de s\'ischermu. Unu butone pro istudare o allùghere sa boghe de ghia durante sa navigatzione. - Unu butone pro annànghere unu parchègiu in su tzentru de s\'ischermu. + Unu butone pro annànghere unu logu de parchègiu in su tzentru de s\'ischermu. " sarvadu in " Logu Atzione lestra mudada de nùmene in %1$s pro non tènnere dopiones. @@ -2234,7 +2238,7 @@ Pro praghere iscrie su còdighe intreu Issèberos pro sos parchègios Ghia a destra Automàtica - OsmAnd (OSM Automated Navigation Directions) est un\'aplicatzione pro sa consultatzione de mapas e sa navigatzione chi impreat sos datos lìberos, vàlidos pro totu su mundu, e de calidade arta, de OpenStreetMap (OSM). + OsmAnd (OSM Automated Navigation Directions) est un\'aplicatzione pro sa consultatzione de mapas e sa navigatzione chi impreat sos datos lìberos, vàlidos pro totu su mundu, e de calidade arta, de OSM. \n \nImprea sa ghia vocale e sas indicatziones in s\'ischermu, càstia sos PDI (puntos de interesse), crea e manìgia rastas GPX, abìlita sa visualizatzione de sas curvas de livellu e sos datos de s\'artària (pro mèdiu de un\'estensione), issèbera sa modalidade intre ghia pro sa màchina, sas bitzicletas e a pede, agiuda a megioare sas mapas OSM e àteru meda. Navigatzione GPS @@ -2291,7 +2295,7 @@ Pro praghere iscrie su còdighe intreu \n• Antàrtide: * \nSa majoria de sos istados de su mundu tenent una mapa chi podet èssere iscarrigada! \nInstalla unu navigadore afidàbile in sa natzione tua - chi siat sa Frantza, sa Germània, su Mèssicu, s\'Ispagna, s\'Olanda, sos Istados Unidos, sa Rùssia, su Brasile o un\'àtera. - OsmAnd+ (OSM Automated Navigation Directions) est un\'aplicatzione pro sa consultatzione de mapas e sa navigatzione chi impreat sos datos lìberos, vàlidos pro totu su mundu, e de calidade arta de OpenStreetMap (OSM). + OsmAnd+ (OSM Automated Navigation Directions) est un\'aplicatzione pro sa consultatzione de mapas e sa navigatzione chi impreat sos datos lìberos, vàlidos pro totu su mundu, e de calidade arta de OSM. \nImprea sa ghia vocale e sas indicatziones in s\'ischermu, càstia sos PDI (puntos de interesse), crea e manìgia rastas GPX, abìlita sa visualizatzione de sas curvas de livellu e de sos datos de s\'artària (pro mèdiu de un\'estensione), issèbera sa modalidade intre ghia pro sa màchina, sas bitzicletas e a pede, agiuda a megiorare sas mapas OSM e àteru meda. \n \nOsmAnd+ est sa versione a pagamentu. Comporande·la, agiudas s\'isvilupu de funtzionalidades noas, e podes retzire sos ùrtimos agiornamentos. @@ -2396,8 +2400,8 @@ Pro praghere iscrie su còdighe intreu Livellu ismmaniamentu ischermu: %1$s Ischema de colores Ammustra incumintzende dae su livellu de ismanniamentu - Permiti sos atzessos privados - Permiti s\'atzessu a sas àreas privadas. + Permite sos atzessos privados + Permite s\'atzessu a sas àreas privadas. Iscàrriga sa mapa \'Umbraduras de sos rilievos\' pro ammustrare s\'umbradura verticale. Installa s\'estensione \'Curvas de Livellu\' pro ammustrare sas àreas verticales graduadas. Cua incumintzende dae su livellu de ismanniamentu @@ -2907,7 +2911,7 @@ Pro praghere iscrie su còdighe intreu Ora de sa die In %1$s Bortada pro bortada - Casta de àndalas + Castas de àndalas Essi in Àrtzia in sa firmada Ammustra/cua sas rastas GPX @@ -3106,7 +3110,7 @@ Pro praghere iscrie su còdighe intreu Pistas pro s\'impreu de islitas. Permite àndalas intermèdias Àndalas prus difìtziles cun tratos prus ratos. De sòlitu carchi ostàculu chi diat dèpere èssere evitadu. - Permiti sas àndalas avantzadas + Permite sas àndalas avantzadas Àndalas difìtziles, cun ostàculos perigulosos e tratos cun ratesa arta. Permite sas àndalas pro espertos Àndalas difìtziles a beru, cun ostàculos e logos a fùrriu perigulosos. @@ -3117,7 +3121,7 @@ Pro praghere iscrie su còdighe intreu Dificultade preferida Preferi àndalas de custa dificultade, fintzas si colare in pistas prus difìtziles o prus fàtziles est galu possìbile si est prus curtzu. In foras de pista - Sas àndalas e sos coladòrgios in foras de pista (freeride e offpiste) non sunt ufitziales. De sòlitu non sunt curadas, non benint manutentadas dae sas autoridades e non benint compidadas su sero. Intra a perìgulu e arriscu tuo. + Sas àndalas e sos coladòrgios in foras de pista (\'freeride\' e \'offpiste\') non sunt ufitziales. De sòlitu non sunt curados, non benint manutentados e non benint compidados su sero. Intra a perìgulu e arriscu tuo. Servìtziu de iscarrigamentu de OsmAnd Magenta Icona @@ -3388,7 +3392,7 @@ Pro praghere iscrie su còdighe intreu Controlla sas ventaneddas a cumparsa, sos diàlogos e sas notìficas. Retzas de nodos Mapas cussigiadas - Custas mapas sunt netzessàrias pro s\'estensione + Custas mapas sunt netzessàrias pro s\'estensione. Profilos annànghidos Profilos annànghidos dae s\'estensione Istuda @@ -3405,7 +3409,7 @@ Pro praghere iscrie su còdighe intreu Grussa Pro sos desertos e sas àteras àreas cun una populatzione minore. Prus a sa minuda. Icona de positzione in movimentu - Icona de positzione in pasu + Icona de positzione in pàusa Incarchende \'Àplica\' as a iscantzellare definitivamente sos profilos rimòvidos. Profilu printzipale Ischerta su colore @@ -3435,7 +3439,7 @@ Pro praghere iscrie su còdighe intreu Arrastamentu in lìnia Pretzisione de registratzione Podes agatare totu sas rastas registradas tuas in %1$s o in sa cartella de OsmAnd. - Sas notas tuas sunt in %1$s + Sas notas tuas sunt in %1$s. Vìdeo-notas Foto-notas Ricàlculu de s\'àndala @@ -3500,4 +3504,40 @@ Pro praghere iscrie su còdighe intreu Inclue datos additzionales Su profilu importadu tenet datos additzionales. Incarca in \"Importa\" pro importare sos datos de su profilu ebbia o ischerta sos datos additzionales de importare. Podes ischertare datos additzionales de esportare in paris cun su profilu. + Nota: verìfica de lestresa > 0: sa majoria de sos insiemes integrados (sos \"chipsets\") GPS frunit unu valore de lestresa petzi si s\'algoritmu determinat chi ses in movimentu, e perunu si non lu ses. Pro custa resone s\'impreu de s\'impostatzione> 0 in custu filtru, in unu tzertu sensu, impreat su rilevamentu de su movimentu de s\'insieme integradu GPS. Ma, fintzas si non benint filtradas inoghe in su momentu de sa registratzione, impreamus su matessi custa funtzionalidade in s\'anàlisi nostra de sas rastas GPX pro determinare sa distàntzia curreta. Est a nàrrere chi su valore ammustradu in cussu campu est sa distàntzia registrada durante su movimentu. + Efetu segundàriu: pro more de su filtru pro acuradesa unos cantos puntos diant pòdere fartare de su totu. A es. in suta de sos pontes, de sos àrbores, intre sos fàbricos artos, o in unas cantas cunditziones metereològicas. + Nota: si su GPS fiat istaudadu finas a su momentu de incumentzu de sa registratzione su primu puntu diat pòdere tènnere un\'acuradesa minimada. Pro custa resone, in su còdighe nostru diamus pòdere impostare una paia de segundos de isetare in antis de registrare unu puntu (o de sarvare su mègius de 3 puntos consecutivos, etz.), ma custa cosa non l\'amus galu implementada. + Custu filtru faghet in manera de evitare chi bi siant puntos dòpios registrados cando b\'at istadu tropu pagu movimentu, dende un\'aspetu prus galanu a sas rastas chi non benint post-protzessadas a pustis. + Efetu segundàriu: sos perìodos de pasu non benint registrados de su totu o pro unu puntu ebbia. Sos movimentos minores in su mundu reale (es. passos a un\'ala, pro sinnare una deviatzione possìbile in su biàgiu tuo) diant pòdere èssere filtrados. Su documentu tuo cuntenet prus pagu informatziones pro su post-protessamentu, e tenet istatìsticas pègius filtrende sos puntos chi sunt rindondantes in manera crara durante sa registratzione, cando diat pòdere lassare faddinas chi derivant dae ritzetzione bassa o dae problemas cun s\'insieme integradu (chipset) GPS. + Impòsitu: Un\'impostatzione de 5 metros diat pòdere funtzionare comente si tocat pro tie si non tenes bisòngiu de rilevare detàllios prus minores de cussos, e non cheres caturare datos cando ses in pasu. + Fratzionamentu de sa registratzione + • Profilos: como podes cambiare s\'òrdine, impostare s\'icona pro sa mapa, mudare totus sos inditos pro sos profilos de base e los ripristinare a sos valores predefinidos +\n +\n • Nùmeru d\'essida in sa navigatzione annànghidu +\n +\n • Impostatziones de s\'estensione rielaboradas +\n +\n • Ischermada de sas impostatziones acontzada pro un\'atzessu lestru a totus sos profilos +\n +\n • Optzione pro copiare sas impostztiones dae unu àteru profilu annànghida +\n +\n • Possibilidade de mudare un\'òrdine o cuare sas categorias de PDI in sa chirca annànghida +\n +\n • Iconas de sos PDI alliniadas in manera curreta in sa mapa +\n +\n • Datos de Intrinada/Arvèschida pro cunfigurare sa mapa annànghidos +\n +\n • Iconas Domo/Traballu annànghidas in sa mapa +\n +\n • Suportu pro sa descritzione multilìnea in sas Impostatziones annànghidu +\n +\n • Trasliteratzione curreta in sa mapa de su Giapone annànghida +\n +\n • Mapa de s\'Antàrtide annànghida +\n +\n + Òrdina pro categoria + Antàrticu + Ammustra notìficas de sistema durante sa navigatzione cun istrutziones de navigatzione. + Notìfica de navigatzione \ No newline at end of file From f0b8da2147b378ba288d73a0347e5194279f54b0 Mon Sep 17 00:00:00 2001 From: Franco Date: Mon, 17 Feb 2020 17:27:12 +0000 Subject: [PATCH 110/120] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-es-rAR/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index fb226b8244..5e46790866 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -3540,4 +3540,6 @@ Lon %2$s El perfil importado contiene datos adicionales. Pulsa en «Importar» para importar sólo datos de perfil o marca datos adicionales para importar. Puedes marcar datos adicionales para exportar junto con el perfil. Antártida + Muestra la notificación del sistema durante la navegación con instrucciones de navegación. + Notificación de navegación \ No newline at end of file From b113808454b5c8866a7ce1ee9e0242a30aac9b2a Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Tue, 18 Feb 2020 03:32:39 +0000 Subject: [PATCH 111/120] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 2c867c8c6b..2392376b37 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -3530,4 +3530,6 @@ 已匯入的設定檔包含了額外資料。點擊匯入僅匯入設定檔資料或選取額外的資料以匯入。 您可以選取額外的資料以與設定檔一起匯出。 南極洲 + 使用導航說明時喜訕系統通知。 + 導航通知 \ No newline at end of file From 8a70fcc9a479170f62d7b8b023e77a4f64f53d03 Mon Sep 17 00:00:00 2001 From: Franco Date: Mon, 17 Feb 2020 17:39:12 +0000 Subject: [PATCH 112/120] Translated using Weblate (Spanish (American)) Currently translated at 100.0% (3186 of 3186 strings) --- OsmAnd/res/values-es-rUS/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index 19a9494eb8..533b63d18c 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -3540,4 +3540,6 @@ Lon %2$s El perfil importado contiene datos adicionales. Pulsa en «Importar» para importar sólo datos de perfil o marca datos adicionales para importar. Puedes marcar datos adicionales para exportar junto con el perfil. Antártida + Muestra la notificación del sistema durante la navegación con instrucciones de navegación. + Notificación de navegación \ No newline at end of file From e8844d67015b8c23fcd10ecba9df601827045473 Mon Sep 17 00:00:00 2001 From: Hinagiku Zeppeki Date: Tue, 18 Feb 2020 08:31:35 +0000 Subject: [PATCH 113/120] Translated using Weblate (Japanese) Currently translated at 99.1% (3159 of 3186 strings) --- OsmAnd/res/values-ja/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 50cfdb9ba6..b6dcbc5547 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -2578,7 +2578,7 @@ POIの更新は利用できません コンテキストメニューを開かずにマップ上のマーカーをタップするだけで1番目のマーカーとしてアクティブ化させます。 ワンタップアクティブ 場所に関するメモをつけよう! - ウィジェットやコンテキストメニューから、音声、動画、写真を使ったメモなどの注釈をマップ上のどの場所にでもつけることができます。 + ウィジェットやコンテキストメニューから音声、動画、写真を利用したメモを、マップ上のどの場所にでもつけることができます。 日付別 種類別 小数点以下の桁数 From 0d0249800318c76d1d9eb04087d178ab30372a3b Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 18 Feb 2020 11:03:18 +0200 Subject: [PATCH 114/120] Fix string resources --- OsmAnd/res/values-te/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-te/strings.xml b/OsmAnd/res/values-te/strings.xml index f10628d696..2dd06451f6 100644 --- a/OsmAnd/res/values-te/strings.xml +++ b/OsmAnd/res/values-te/strings.xml @@ -61,8 +61,8 @@ కస్టమ్ కేటగిరీ జోడించు రాత్రిపూట మాత్రమే చూపించు %1$s/%2$s - %1 $ s వద్ద సూర్యాస్తమయం - %1 $ s వద్ద సూర్యోదయం + %1$s వద్ద సూర్యాస్తమయం + %1$s వద్ద సూర్యోదయం మీ సిస్టమ్ లో యాక్సెసబిలిటీ మోడ్ డిసేబుల్ చేయబడింది. సిస్టం స్క్రీన్ టైమ్ అవుట్ ను ఉపయోగించు చెరిపివెయుట From 02d034a723eb78d266d1ecf6d80e08b42aa70238 Mon Sep 17 00:00:00 2001 From: xmd5a Date: Tue, 18 Feb 2020 14:05:07 +0300 Subject: [PATCH 115/120] Update phrases --- OsmAnd/res/values-ru/phrases.xml | 1 - OsmAnd/res/values/phrases.xml | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-ru/phrases.xml b/OsmAnd/res/values-ru/phrases.xml index 5e39bcb1dc..7ab299cb84 100644 --- a/OsmAnd/res/values-ru/phrases.xml +++ b/OsmAnd/res/values-ru/phrases.xml @@ -337,7 +337,6 @@ Альтернативная медицина Отоларинголог Банк крови - Медицинский центр Акушерка Профессиональный врач Оптометрист diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml index 96748f5c3d..d245fcaa83 100644 --- a/OsmAnd/res/values/phrases.xml +++ b/OsmAnd/res/values/phrases.xml @@ -634,7 +634,6 @@ Alternative medicine Audiologist Blood bank - Medical center Midwife Occupational therapist Optometrist @@ -4190,4 +4189,6 @@ Hunting base + Scuba diving centre + From b9d217e67579b30a0f3fa26263fa8f26e7c2132f Mon Sep 17 00:00:00 2001 From: max-klaus Date: Tue, 18 Feb 2020 14:15:15 +0300 Subject: [PATCH 116/120] Fix #8488 --- .../src/main/java/net/osmand/data/RotatedTileBox.java | 6 +++--- OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/data/RotatedTileBox.java b/OsmAnd-java/src/main/java/net/osmand/data/RotatedTileBox.java index e3a03bac70..57c0080625 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/RotatedTileBox.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/RotatedTileBox.java @@ -281,7 +281,7 @@ public class RotatedTileBox { } public int getPixXFromLonNoRot(double longitude) { - double dTilex = (float) MapUtils.getTileNumberX(zoom, longitude) - oxTile; + double dTilex = MapUtils.getTileNumberX(zoom, longitude) - oxTile; return (int) (dTilex * zoomFactor + cx); } @@ -291,8 +291,8 @@ public class RotatedTileBox { } public int getPixYFromLatNoRot(double latitude) { - double dTileY = MapUtils.getTileNumberY(zoom, latitude) - oyTile; - return (int) ((dTileY * zoomFactor) + cy); + double dTileY = MapUtils.getTileNumberY(zoom, latitude) - oyTile; + return (int) (dTileY * zoomFactor + cy); } public int getPixYFromTileYNoRot(double tileY) { diff --git a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java index f505e51639..fa7b29ad16 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java @@ -80,7 +80,7 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay @Override public void onDraw(Canvas canvas, RotatedTileBox box, DrawSettings nightMode) { - if(box.getZoom() < 3) { + if (box.getZoom() < 3) { return; } // draw @@ -88,7 +88,7 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay Location lastKnownLocation = locationProvider.getLastStaleKnownLocation(); updateIcons(view.getSettings().getApplicationMode(), nm, view.getApplication().getLocationProvider().getLastKnownLocation() == null); - if(lastKnownLocation == null || view == null){ + if (lastKnownLocation == null || view == null) { return; } int locationX; @@ -96,8 +96,8 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay if (mapViewTrackingUtilities.isMapLinkedToLocation() && !MapViewTrackingUtilities.isSmallSpeedForAnimation(lastKnownLocation) && !mapViewTrackingUtilities.isMovingToMyLocation()) { - locationX = box.getPixXFromLonNoRot(box.getLongitude()); - locationY = box.getPixYFromLatNoRot(box.getLatitude()); + locationX = box.getCenterPixelX(); + locationY = box.getCenterPixelY(); } else { locationX = box.getPixXFromLonNoRot(lastKnownLocation.getLongitude()); locationY = box.getPixYFromLatNoRot(lastKnownLocation.getLatitude()); @@ -105,7 +105,6 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay final double dist = box.getDistance(0, box.getPixHeight() / 2, box.getPixWidth(), box.getPixHeight() / 2); int radius = (int) (((double) box.getPixWidth()) / dist * lastKnownLocation.getAccuracy()); - if (radius > RADIUS * box.getDensity()) { int allowedRad = Math.min(box.getPixWidth() / 2, box.getPixHeight() / 2); canvas.drawCircle(locationX, locationY, Math.min(radius, allowedRad), area); From 74f02205142cb8447a2e981134be4c5b30db393c Mon Sep 17 00:00:00 2001 From: Nazar Date: Tue, 18 Feb 2020 13:20:08 +0200 Subject: [PATCH 117/120] Fix #6190 (RTL) --- OsmAnd/AndroidManifest.xml | 3 ++- .../layout/dialog_list_item_with_compound_button.xml | 4 +++- .../layout/main_menu_drawer_btn_switch_profile.xml | 2 ++ OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java | 9 ++++++++- OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java | 1 + OsmAnd/src/net/osmand/plus/UiUtilities.java | 11 +++++++++++ 6 files changed, 27 insertions(+), 3 deletions(-) diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 7b8320cb81..78f39d682e 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -52,7 +52,8 @@ + android:theme="@style/OsmandDarkTheme" android:restoreAnyVersion="true" android:largeHeap="true" + android:supportsRtl="true" android:usesCleartextTraffic="true"> diff --git a/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml b/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml index bbaac7be5d..198e7b22c2 100644 --- a/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml +++ b/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml @@ -23,7 +23,9 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginLeft="@dimen/context_menu_padding_margin_large" - android:layout_marginRight="@dimen/context_menu_padding_margin_large"> + android:layout_marginRight="@dimen/content_padding_small" + android:layout_marginStart="@dimen/context_menu_padding_margin_large" + android:layout_marginEnd="@dimen/content_padding_small"> 0) { convertView.setMinimumHeight(item.getMinHeight()); } @@ -336,7 +338,12 @@ public class ContextMenuAdapter { int paddingInPixels = (int) (24 * density); int drawableSizeInPixels = (int) (24 * density); // 32 drawable.setBounds(0, 0, drawableSizeInPixels, drawableSizeInPixels); - tv.setCompoundDrawables(drawable, null, null, null); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { + tv.setCompoundDrawablesRelative(drawable, null, null, null); + UiUtilities.setupLayoutDirection(tv); + } else { + tv.setCompoundDrawables(drawable, null, null, null); + } tv.setCompoundDrawablePadding(paddingInPixels); } } else { diff --git a/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java b/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java index dd45f6ba67..b4be2f4955 100644 --- a/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java +++ b/OsmAnd/src/net/osmand/plus/DialogListItemAdapter.java @@ -79,6 +79,7 @@ public class DialogListItemAdapter extends BaseAdapter { } View button = view.findViewById(R.id.button); button.setTag(position); + UiUtilities.setupLayoutDirection(button); final CompoundButton cb; if (multiChoice) { cb = view.findViewById(R.id.checkbox); diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java index 8a60737329..8ac7996f92 100644 --- a/OsmAnd/src/net/osmand/plus/UiUtilities.java +++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java @@ -17,6 +17,8 @@ import android.support.annotation.DrawableRes; import android.support.annotation.StringRes; import android.support.v4.content.ContextCompat; import android.support.v4.graphics.drawable.DrawableCompat; +import android.support.v4.text.TextUtilsCompat; +import android.support.v4.view.ViewCompat; import android.support.v4.widget.TintableCompoundButton; import android.support.v7.view.ContextThemeWrapper; import android.support.v7.widget.SwitchCompat; @@ -34,6 +36,8 @@ import net.osmand.data.LatLon; import net.osmand.plus.views.DirectionDrawable; import net.osmand.plus.widgets.TextViewEx; +import java.util.Locale; + import gnu.trove.map.hash.TLongObjectHashMap; public class UiUtilities { @@ -338,6 +342,13 @@ public class UiUtilities { } return screenOrientation; } + + public static void setupLayoutDirection(View layout) { + Context ctx = layout.getContext(); + Locale currentLocale = ctx.getResources().getConfiguration().locale; + int direction = TextUtilsCompat.getLayoutDirectionFromLocale(currentLocale); + ViewCompat.setLayoutDirection(layout, direction); + } public static void setupCompoundButtonDrawable(Context ctx, boolean nightMode, @ColorInt int activeColor, Drawable drawable) { int inactiveColor = ContextCompat.getColor(ctx, nightMode ? R.color.icon_color_default_dark : R.color.icon_color_default_light); From 73d3b77233ac72d9f9c53c41bcdd2caf6cb002cf Mon Sep 17 00:00:00 2001 From: Nazar Date: Tue, 18 Feb 2020 13:27:43 +0200 Subject: [PATCH 118/120] Small fixes --- OsmAnd/res/layout/dialog_list_item_with_compound_button.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml b/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml index 198e7b22c2..e34d5da486 100644 --- a/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml +++ b/OsmAnd/res/layout/dialog_list_item_with_compound_button.xml @@ -23,9 +23,9 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginLeft="@dimen/context_menu_padding_margin_large" - android:layout_marginRight="@dimen/content_padding_small" + android:layout_marginRight="@dimen/context_menu_padding_margin_large" android:layout_marginStart="@dimen/context_menu_padding_margin_large" - android:layout_marginEnd="@dimen/content_padding_small"> + android:layout_marginEnd="@dimen/context_menu_padding_margin_large"> Date: Tue, 18 Feb 2020 13:48:51 +0200 Subject: [PATCH 119/120] Fix Global Settings compound buttons color --- .../osmand/plus/settings/BaseSettingsFragment.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index af4b019860..646f1288c9 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -387,14 +387,16 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl titleView.setSingleLine(false); } boolean enabled = preference.isEnabled(); - if (isProfileDependent()) { - View cb = holder.itemView.findViewById(R.id.switchWidget); - if (cb == null) { - cb = holder.findViewById(android.R.id.checkbox); - } - if (cb instanceof CompoundButton) { + View cb = holder.itemView.findViewById(R.id.switchWidget); + if (cb == null) { + cb = holder.findViewById(android.R.id.checkbox); + } + if (cb instanceof CompoundButton) { + if (isProfileDependent()) { int color = enabled ? getActiveProfileColor() : getDisabledTextColor(); UiUtilities.setupCompoundButton(isNightMode(), color, (CompoundButton) cb); + } else { + UiUtilities.setupCompoundButton((CompoundButton) cb, isNightMode(), UiUtilities.CompoundButtonType.GLOBAL); } } if ((preference.isPersistent() || preference instanceof TwoStatePreference) && !(preference instanceof PreferenceCategory)) { From 55cc4c44f8fb990d69347beb900c6508e95645a5 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Tue, 18 Feb 2020 16:12:32 +0300 Subject: [PATCH 120/120] Fix #8484 --- OsmAnd/src/net/osmand/plus/SQLiteTileSource.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java index 88ee8ca3f7..4984aa66e6 100644 --- a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java +++ b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java @@ -528,6 +528,7 @@ public class SQLiteTileSource implements ITileSource { return; } db.execSQL("DELETE FROM tiles"); + db.execSQL("VACUUM"); } @Override