forked from upstream-mirrors/OpenTracks
Bug fix, don't adjust zoom level when keeping screen visible
This commit is contained in:
@@ -523,7 +523,10 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
|
|||||||
onLocationChangedListener.onLocationChanged(currentLocation);
|
onLocationChangedListener.onLocationChanged(currentLocation);
|
||||||
if (forceZoom || (keepCurrentLocationVisible && !isLocationVisible(currentLocation))) {
|
if (forceZoom || (keepCurrentLocationVisible && !isLocationVisible(currentLocation))) {
|
||||||
LatLng latLng = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());
|
LatLng latLng = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());
|
||||||
googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, DEFAULT_ZOOM_LEVEL));
|
CameraUpdate cameraUpdate = forceZoom ? CameraUpdateFactory.newLatLngZoom(
|
||||||
|
latLng, DEFAULT_ZOOM_LEVEL)
|
||||||
|
: CameraUpdateFactory.newLatLng(latLng);
|
||||||
|
googleMap.animateCamera(cameraUpdate);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user