Fix #6342
This commit is contained in:
parent
c2762e6610
commit
0ff2db1286
2 changed files with 4 additions and 4 deletions
|
@ -337,10 +337,10 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
|||
}
|
||||
|
||||
public void backToLocationImpl() {
|
||||
backToLocationImpl(15);
|
||||
backToLocationImpl(15, false);
|
||||
}
|
||||
|
||||
public void backToLocationImpl(int zoom) {
|
||||
public void backToLocationImpl(int zoom, boolean forceZoom) {
|
||||
if (mapView != null) {
|
||||
OsmAndLocationProvider locationProvider = app.getLocationProvider();
|
||||
if (!isMapLinkedToLocation()) {
|
||||
|
@ -348,7 +348,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
|||
net.osmand.Location lastKnownLocation = locationProvider.getLastKnownLocation();
|
||||
if (lastKnownLocation != null) {
|
||||
AnimateDraggingMapThread thread = mapView.getAnimatedDraggingThread();
|
||||
int fZoom = mapView.getZoom() < zoom ? zoom : mapView.getZoom();
|
||||
int fZoom = mapView.getZoom() < zoom && (forceZoom || app.getSettings().AUTO_ZOOM_MAP.get()) ? zoom : mapView.getZoom();
|
||||
movingToMyLocation = true;
|
||||
thread.startMoving(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(),
|
||||
fZoom, false, new Runnable() {
|
||||
|
|
|
@ -705,7 +705,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
touchEvent = 0;
|
||||
app.logEvent(mapActivity, "start_navigation");
|
||||
app.getSettings().APPLICATION_MODE.set(routingHelper.getAppMode());
|
||||
mapActivity.getMapViewTrackingUtilities().backToLocationImpl(17);
|
||||
mapActivity.getMapViewTrackingUtilities().backToLocationImpl(17, true);
|
||||
app.getSettings().FOLLOW_THE_ROUTE.set(true);
|
||||
routingHelper.setFollowingMode(true);
|
||||
routingHelper.setRoutePlanningMode(false);
|
||||
|
|
Loading…
Reference in a new issue