[android] easeCamera method that takes only update and cancellable callback as arguments

This commit is contained in:
Łukasz Paczos
2018-09-25 15:19:19 +02:00
committed by Łukasz Paczos
parent 652c66e665
commit a3a12a2ac2

View File

@@ -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