Fix #7378
This commit is contained in:
parent
ab74acd2c9
commit
b1ddc1b127
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue