diff options
author | Brad Leege <bleege@gmail.com> | 2015-12-20 09:46:59 -0600 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-12-20 09:46:59 -0600 |
commit | 77d62baa50bcc1b0fad656b4abce82e6eb76b805 (patch) | |
tree | d40f8f6a2e8926aae7464a757dae49013d9373aa /platform/android/MapboxGLAndroidSDKTestApp | |
parent | 8f532eeefa72ec92bbb61d6f3a12c78e2bd181cd (diff) | |
download | qtlocation-mapboxgl-77d62baa50bcc1b0fad656b4abce82e6eb76b805.tar.gz |
[android] #3358 - Created easeCamera() API method.
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/CameraActivity.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/CameraActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/CameraActivity.java index 24974c120b..52e242fae5 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/CameraActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/CameraActivity.java @@ -67,7 +67,21 @@ public class CameraActivity extends AppCompatActivity { .bearing(180) // Sets the orientation of the camera to south .build(); // Creates a CameraPosition from the builder - mMapView.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); + MapView.CancelableCallback callback = new MapView.CancelableCallback() { + @Override + public void onCancel() { + Log.i(TAG, "Duration onCancel Callback called."); + Toast.makeText(CameraActivity.this, "Ease onCancel Callback called.", Toast.LENGTH_LONG).show(); + } + + @Override + public void onFinish() { + Log.i(TAG, "Duration onFinish Callback called."); + Toast.makeText(CameraActivity.this, "Ease onFinish Callback called.", Toast.LENGTH_LONG).show(); + } + }; + + mMapView.easeCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 25000, callback); } }); |