summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LayerLatLngAnimator.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LayerLatLngAnimator.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LayerLatLngAnimator.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LayerLatLngAnimator.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LayerLatLngAnimator.java
new file mode 100644
index 0000000000..f4dc2861cf
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LayerLatLngAnimator.java
@@ -0,0 +1,25 @@
+package com.mapbox.mapboxsdk.location;
+
+import android.animation.ValueAnimator;
+
+import com.mapbox.mapboxsdk.geometry.LatLng;
+
+import java.util.List;
+
+class LayerLatLngAnimator extends MapboxLatLngAnimator<MapboxAnimator.OnLayerAnimationsValuesChangeListener> {
+ LayerLatLngAnimator(LatLng previous, LatLng target, List<OnLayerAnimationsValuesChangeListener> updateListeners) {
+ super(previous, target, updateListeners);
+ }
+
+ @Override
+ int provideAnimatorType() {
+ return ANIMATOR_LAYER_LATLNG;
+ }
+
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ for (OnLayerAnimationsValuesChangeListener listener : updateListeners) {
+ listener.onNewLatLngValue((LatLng) animation.getAnimatedValue());
+ }
+ }
+}