summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2018-09-25 15:19:19 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2018-11-01 17:08:48 +0100
commita3a12a2ac2a729f749a573697105b3f1f58d4713 (patch)
treeda4e47e883c364fdde5a56093b9a68b71a49d9db
parent652c66e6654793a11105ae66ff5ef9949aa3aac6 (diff)
downloadqtlocation-mapboxgl-a3a12a2ac2a729f749a573697105b3f1f58d4713.tar.gz
[android] easeCamera method that takes only update and cancellable callback as arguments
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
index 1fd1017c5f..fd80f899e0 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
@@ -686,6 +686,23 @@ public final class MapboxMap {
}
/**
+ * Gradually move the camera by the default duration, zoom will not be affected unless specified
+ * within {@link CameraUpdate}. If {@link #getCameraPosition()} is called during the animation,
+ * it will return the current location of the camera in flight.
+ *
+ * @param update The change that should be applied to the camera.
+ * @param callback An optional callback to be notified from the main thread when the animation
+ * stops. If the animation stops due to its natural completion, the callback
+ * will be notified with onFinish(). If the animation stops due to interruption
+ * by a later camera movement or a user gesture, onCancel() will be called.
+ * Do not update or ease the camera from within onCancel().
+ * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.
+ */
+ public final void easeCamera(CameraUpdate update, @Nullable final MapboxMap.CancelableCallback callback) {
+ easeCamera(update, MapboxConstants.ANIMATION_DURATION, callback);
+ }
+
+ /**
* Gradually move the camera by a specified duration in milliseconds, zoom will not be affected
* unless specified within {@link CameraUpdate}. If {@link #getCameraPosition()} is called
* during the animation, it will return the current location of the camera in flight.