resolves #24
This commit is contained in:
@@ -44,6 +44,7 @@ final class LocationCameraController {
|
||||
|
||||
private boolean isTransitioning;
|
||||
private LatLng lastLocation;
|
||||
private boolean isEnabled;
|
||||
|
||||
LocationCameraController(
|
||||
Context context,
|
||||
@@ -133,7 +134,8 @@ final class LocationCameraController {
|
||||
long transitionDuration,
|
||||
Double zoom, Double bearing, Double tilt,
|
||||
final OnLocationCameraTransitionListener internalTransitionListener) {
|
||||
if (!wasTracking && isLocationTracking() && lastLocation != null) {
|
||||
if (!wasTracking && isLocationTracking() && lastLocation != null && isEnabled)
|
||||
{
|
||||
isTransitioning = true;
|
||||
LatLng target = new LatLng(lastLocation);
|
||||
|
||||
@@ -320,6 +322,10 @@ final class LocationCameraController {
|
||||
|| cameraMode == CameraMode.NONE_COMPASS;
|
||||
}
|
||||
|
||||
void setEnabled(boolean enabled) {
|
||||
isEnabled = enabled;
|
||||
}
|
||||
|
||||
private boolean isLocationTracking() {
|
||||
return cameraMode == CameraMode.TRACKING
|
||||
|| cameraMode == CameraMode.TRACKING_COMPASS
|
||||
|
||||
@@ -517,6 +517,7 @@ public final class LocationComponent {
|
||||
} else {
|
||||
disableLocationComponent();
|
||||
}
|
||||
locationCameraController.setEnabled(isEnabled);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user