From a3a12a2ac2a729f749a573697105b3f1f58d4713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Paczos?= Date: Tue, 25 Sep 2018 15:19:19 +0200 Subject: [android] easeCamera method that takes only update and cancellable callback as arguments --- .../main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 @@ -685,6 +685,23 @@ public final class MapboxMap { easeCamera(update, MapboxConstants.ANIMATION_DURATION); } + /** + * 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 -- cgit v1.2.1