Skip to content

Commit dac2d6b

Browse files
authored
Fix ReplayRouteLocationConverter.java that function calculateMockLocations return points with wrong bearings. (#1476)
1 parent 6d83be0 commit dac2d6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/location/replay/ReplayRouteLocationConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ List<Location> calculateMockLocations(List<Point> points) {
8181
Location mockedLocation = createMockLocationFrom(point);
8282

8383
if (pointsToCopy.size() >= 2) {
84-
double bearing = TurfMeasurement.bearing(point, points.get(1));
84+
double bearing = TurfMeasurement.bearing(point, pointsToCopy.get(1));
8585
mockedLocation.setBearing((float) bearing);
8686
}
8787
time += delay * ONE_SECOND_IN_MILLISECONDS;

0 commit comments

Comments
 (0)