Bug fix, don't adjust zoom level when keeping screen visible

This commit is contained in:
Jimmy Shih
2014-01-24 11:14:58 -08:00
parent d42b6e5361
commit 409621a240
@@ -523,7 +523,10 @@ public class MyTracksMapFragment extends SupportMapFragment implements TrackData
onLocationChangedListener.onLocationChanged(currentLocation);
if (forceZoom || (keepCurrentLocationVisible && !isLocationVisible(currentLocation))) {
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);
}
};
});