Skip to content

Commit

Permalink
Fix simulated speed label in NavigationViewController (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk authored Jun 3, 2024
1 parent 3ffaa51 commit 0c7a0f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
- Deprecated `DayStyle()`/`NightStyle()` initializers because they were backed by an implicit tile service. If these default styles *are* still used, they'll now use the MapLibre demo style.
- `NavigationViewController` now expects explicit style URLs with `NavigationViewController(route:dayStyleURL:nightStyleURL:...)` or NavigationViewController(route:dayStyle:nightStyle:...)` and the existing initializer, which allowed "default" styles, is deprecated and uses the MapLibre demo styles.
- Fix: NavigationViewController was not re-routing when the user went off route.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/47>.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/47>
- Fix: NavigationViewController displayed incorrect `speedMultiplier` when using SimulatedLocationManager
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/49>

## v2.0.0 (May 23, 2023)
- Upgrade minimum iOS version from 11.0 to 12.0.
Expand Down
4 changes: 2 additions & 2 deletions MapboxNavigation/NavigationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ open class NavigationViewController: UIViewController {
UIApplication.shared.isIdleTimerDisabled = true
}

if self.routeController.locationManager is SimulatedLocationManager {
let localized = String.Localized.simulationStatus(speed: 1)
if let simulatedLocationManager = self.routeController.locationManager as? SimulatedLocationManager {
let localized = String.Localized.simulationStatus(speed: Int(simulatedLocationManager.speedMultiplier))
self.mapViewController?.statusView.show(localized, showSpinner: false, interactive: true)
}
}
Expand Down

0 comments on commit 0c7a0f6

Please sign in to comment.