File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
plugin-locationcomponent/src/main/java/com/mapbox/maps/plugin/locationcomponent Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ Mapbox welcomes participation and contributions from everyone.
88* Added new ` FillLayer.fillPatternCrossFade ` , ` FillExtrusionLayer.fillExtrusionPatternCrossFade ` , ` LineLayer.fillExtrusionPatternCrossFade ` properties.
99* Improve the performance of ` MapboxMap.cameraForCoordinates(...) ` for large amounts of points.
1010
11+ # 11.13.0
12+ ## Bug fixes 🐞
13+ * Fix location indicator bearing animation update being missing in some occasions.
14+
1115# 11.12.3 June 05, 2025
1216## Features ✨ and improvements 🏁
1317* Improve the performance of ` MapboxMap.cameraForCoordinates(...) ` for large amounts of points.
Original file line number Diff line number Diff line change 11package com.mapbox.maps.plugin.locationcomponent
22
3+ import android.animation.Animator
4+ import android.animation.AnimatorListenerAdapter
35import android.animation.ValueAnimator
46import android.content.Context
57import androidx.annotation.RestrictTo
68import androidx.annotation.VisibleForTesting
79import androidx.annotation.VisibleForTesting.Companion.PRIVATE
8- import androidx.core.animation.doOnEnd
910import com.mapbox.bindgen.Value
1011import com.mapbox.common.location.LocationError
1112import com.mapbox.geojson.Point
@@ -45,6 +46,13 @@ internal class LocationPuckManager(
4546 lastBearing = it
4647 }
4748
49+ private val disablePuckAnimationOnEnd = object : AnimatorListenerAdapter () {
50+ override fun onAnimationEnd (animation : Animator ) {
51+ animationManager.puckAnimationEnabled = false
52+ animation.removeListener(this )
53+ }
54+ }
55+
4856 private var lastAccuracyRadius: Double = 0.0
4957 private val onAccuracyRadiusUpdated: ((Double ) -> Unit ) = {
5058 lastAccuracyRadius = it
@@ -155,9 +163,7 @@ internal class LocationPuckManager(
155163 doubleArrayOf(0.0 ),
156164 options = {
157165 duration = 0
158- doOnEnd {
159- animationManager.puckAnimationEnabled = false
160- }
166+ addListener(disablePuckAnimationOnEnd)
161167 },
162168 forceUpdate
163169 )
You can’t perform that action at this time.
0 commit comments