diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-09-25 15:19:19 +0200 |
---|---|---|
committer | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-10-30 16:50:47 +0100 |
commit | 343d57d65735a120ff96dd60bc1460c02a48b21c (patch) | |
tree | 269dc4da74727326b178cf750f551b39b8dcfff2 | |
parent | 0cdf1d945c39c2665606531dc587334f5a4bfdba (diff) | |
download | qtlocation-mapboxgl-343d57d65735a120ff96dd60bc1460c02a48b21c.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.java | 17 |
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 106026732c..150c47f253 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 @@ -684,6 +684,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. |