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