Skip to content

Commit f9e2790

Browse files
IlyaPavlovskiigithub-actions[bot]
authored andcommitted
Ip/navpor 893 adopt positioning changes to the main branch (#10645)
* NAVPOR-893: Add positioning changes to debug panel. Adopt positioning changes and take it from config/debugModeRepository GitOrigin-RevId: 9ee341f7fee5dd9e00215bdbc5fce8bf022d8410
1 parent aa4d6f4 commit f9e2790

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

ui-maps/src/main/java/com/mapbox/navigation/ui/maps/location/NavigationLocationProvider.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ class NavigationLocationProvider : LocationProvider {
7474
var lastKeyPoints: List<Location> = emptyList()
7575
private set
7676

77+
/**
78+
* Configures the puck animation duration in milliseconds.
79+
* Defaults to 1000ms.
80+
*/
81+
var puckAnimationDuration: Long = LocationComponentConstants.DEFAULT_INTERVAL_MILLIS
82+
7783
/**
7884
* Register the location consumer to the Location Provider.
7985
*
@@ -162,7 +168,7 @@ class NavigationLocationProvider : LocationProvider {
162168
this.onLocationUpdated(
163169
location = latLngUpdates,
164170
options = {
165-
this.duration = LocationComponentConstants.DEFAULT_INTERVAL_MILLIS
171+
this.duration = puckAnimationDuration
166172
this.interpolator = puckAnimationEvaluatorInterpolator
167173
this.setEvaluator(puckAnimationEvaluatorInterpolator)
168174
latLngTransitionOptions?.also { this.apply(it) }
@@ -174,7 +180,7 @@ class NavigationLocationProvider : LocationProvider {
174180
options = {
175181
// keeping animation frames in sync between bearing and position animation
176182
this.interpolator = puckAnimationEvaluatorInterpolator
177-
this.duration = LocationComponentConstants.DEFAULT_INTERVAL_MILLIS
183+
this.duration = puckAnimationDuration
178184
bearingTransitionOptions?.also { this.apply(it) }
179185
},
180186
)

0 commit comments

Comments
 (0)