File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
Sources/MapboxNavigationCore/Map/Camera
Tests/MapboxNavigationCoreTests/Map/Camera Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 3232
3333* Fixed an issue where the user interface did not necessarily display distances in the same measurement system as the requested route by default.
3434* Fixed the fallback to the ` RouteOptions.locale ` for on-device speech synthesizing if the Mapbox Voice API does not support the requested language.
35+ * Fixed the delay on camera changes during heading updates with using the walking routing profile.
3536
3637### Packaging
3738
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public class NavigationCamera {
8585 observe ( viewportDataSource: self . viewportDataSource)
8686
8787 _states
88- . debounce ( for: 0.2 , scheduler: DispatchQueue . main)
88+ . throttle ( for: 0.2 , scheduler: DispatchQueue . main, latest : true )
8989 . sink { [ weak self] newState in
9090 guard let self else { return }
9191 if let location = newState. location {
Original file line number Diff line number Diff line change @@ -244,15 +244,8 @@ class NavigationCameraTests: BaseTestCase {
244244 }
245245
246246 @MainActor
247- func testViewportDataSourceForActiveGuidance( ) async {
247+ func testViewportDataSourceForActiveGuidance( ) async throws {
248248 let navigationViewportDataSource = navigationCamera. viewportDataSource as? MobileViewportDataSource
249-
250- let expectation = XCTestExpectation ( description: " Camera options expectation. " )
251- navigationCamera. cameraStates
252- . sink { _ in
253- expectation. fulfill ( )
254- } . store ( in: & subscriptions)
255-
256249 let location = CLLocation ( latitude: 37.112341 , longitude: - 122.1111678 )
257250 locationPublisher. send ( location)
258251
@@ -261,7 +254,7 @@ class NavigationCameraTests: BaseTestCase {
261254 progress. update ( using: status)
262255 routeProgressPublisher. send ( progress)
263256
264- await fulfillment ( of : [ expectation ] , timeout : 1 )
257+ try await Task . sleep ( nanoseconds : NSEC_PER_SEC )
265258
266259 let cameraOptions = navigationViewportDataSource? . currentNavigationCameraOptions
267260 guard let temporaryPitch = cameraOptions? . followingCamera. pitch else {
You can’t perform that action at this time.
0 commit comments