Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simulated speed label in NavigationViewController #49

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading