aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormax-klaus <53395422+max-klaus@users.noreply.github.com>2019-10-21 10:40:26 +0300
committerGitHub <noreply@github.com>2019-10-21 10:40:26 +0300
commit94ad0d5b2b1fc009d7788cfe05b2c5c10630cd39 (patch)
tree54f745f82b8883900c6eeaa6db090bf503b456a8
parente445c9ba72821a5c4be1a9e2efa2a019a98764c7 (diff)
parentb1ddc1b1279271915a876d1bc35d86ab59ecdbf7 (diff)
downloadOsmand-94ad0d5b2b1fc009d7788cfe05b2c5c10630cd39.tar.gz
Merge pull request #7708 from osmandapp/Fix_7378
Fix #7378
-rw-r--r--OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java6
-rw-r--r--OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java
index 9cf4e72a28..e07e04d1d4 100644
--- a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java
+++ b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java
@@ -128,7 +128,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
myLocation != null && isSmallSpeedForDirectionOfMovement(myLocation, speedForDirectionOfMovement);
if ((settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS || (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING && smallSpeedForDirectionOfMovement)) && !routePlanningMode) {
if (Math.abs(MapUtils.degreesDiff(mapView.getRotate(), -val)) > 1.0) {
- mapView.setRotate(-val);
+ mapView.setRotate(-val, false);
}
} else if (showViewAngle && headingChanged) {
mapView.refreshMap();
@@ -208,7 +208,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
mapView.getAnimatedDraggingThread().startZooming(zoom.first, zoom.second, false);
}
if (rotation != null) {
- mapView.setRotate(rotation);
+ mapView.setRotate(rotation, false);
}
mapView.setLatLon(location.getLatitude(), location.getLongitude());
}
@@ -264,7 +264,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
public void updateSettings(){
if (mapView != null) {
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_NONE || routePlanningMode) {
- mapView.setRotate(0);
+ mapView.setRotate(0, true);
}
mapView.setMapPosition(settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING
&& !routePlanningMode
diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
index 9909badc2c..a84587cc3d 100644
--- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
+++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
@@ -399,10 +399,10 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
return getZoom() > LOWEST_ZOOM_TO_ROTATE;
}
- public void setRotate(float rotate) {
+ public void setRotate(float rotate, boolean force) {
if (isMapRotateEnabled()) {
float diff = MapUtils.unifyRotationDiff(rotate, getRotate());
- if (Math.abs(diff) > 5) { // check smallest rotation
+ if (Math.abs(diff) > 5 || force) { // check smallest rotation
animatedDraggingThread.startRotate(rotate);
}
}