Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…tion-ios into feature/example

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
Patrick-Kladek committed Jun 18, 2024
2 parents b7a5429 + b790f96 commit 529f315
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 38 deletions.
69 changes: 35 additions & 34 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
# Changes to the Mapbox Navigation SDK for iOS

## Unreleased
* Start & Stop Navigation in existing Map
- Removed: `NavigationViewController(for route: Route, dayStyle: Style, routeController: RouteController? = nil, locationManager: NavigationLocationManager? = nil, voiceController: RouteVoiceController? = nil)` use `NavigationViewController(dayStyleURL: URL, nightStyleURL: URL? = nil,directions: Directions = .shared, voiceController: RouteVoiceController = RouteVoiceController())` followed by `startNavigation(with route: Route)` instead.
- To simulate a route, pass a `SimulatedLocationManager` to `startNavigation()` function:

- The `speak` method in `RouteVoiceController` can be used without a given `RouteProgress` or the `RouteProgress` can explicitly ignored so that it will not be added to the voice instruction.
- `RouteProgress` is now optional in `willSpeak` method of `VoiceControllerDelegate` if the `RouteProgress` in the `speak` method of the `RouteVoiceController is `nil`.
- Uses the `Locale` given in `RouteOptions` to create the corresponding `AVSpeechSynthesisVoice`.
- Removed setCamera() from updateCourseTracking()
- Added setCamera() to progressDidChange()
- Allow to customize rerouting logic by implementing RouteControllerDelegate#routeControllerGetDirections
- Add option to overwrite camera update via NavigationMapViewCourseTrackingDelegate#updateCamera
- Remove MapboxVoiceController and Mapbox Speech dependency. If you would like to use MapboxSpeech, you can copy the deleted MapboxVoiceController into your project.
- Updated MapLibre Native dependency to ios-v6.0.0 (https://github.com/maplibre/maplibre-native/releases/tag/ios-v6.0.0). Implementers need to change the prefix MGL to MLN for all MapLibre Native classes that are referenced.
- Only snap location to route if the location is within the `RouteControllerUserLocationSnappingDistance`
- Add support for Swift Package Manager while dropping Carthage and Cocoapods.
- Initialization no longer tries to add mapbox://mapbox.mapbox-streets-v7 to all mapstyles.
- Removed implicit default dependencies on MapBox tileservers by requiring explicit styles URLs in more places.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/45>.
- BREAKING: Removed `MLNStyle` extensions referencing non-functioning MapBox styles, e.g. `MLNStyle.navigationGuidanceDayStyleURL`.
- Added `Day/NightStyle(styleURL:)` which takes an explicit URL to a hosting tileserver style.
- Added `Day/NightStyle(demoStyle: ())` as an explicit alternative when the user doesn't have a tileserver handy. This uses MapLibre's demo style and is intended for testing and demonstration use only.
- 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>
- Fix: NavigationViewController displayed incorrect `speedMultiplier` when using SimulatedLocationManager
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/49>
- Start & Stop Navigation in existing Map
- Removed: `NavigationViewController(for route: Route, dayStyle: Style, routeController: RouteController? = nil, locationManager: NavigationLocationManager? = nil, voiceController: RouteVoiceController? = nil)` use `NavigationViewController(dayStyleURL: URL, nightStyleURL: URL? = nil,directions: Directions = .shared, voiceController: RouteVoiceController = RouteVoiceController())` followed by `startNavigation(with route: Route)` instead.
- To simulate a route, pass a `SimulatedLocationManager` to `startNavigation()` function:

```swift
```swift
let vc = NavigationViewController(dayStyleURL: AppConfig().tileserverStyleUrl)

if Env.current.simulateLocationForTesting {
Expand All @@ -39,19 +15,44 @@
} else {
vc.startNavigation(with: route)
}
```
```

## 3.0.0 (Jun 15, 2024)
* The `speak` method in `RouteVoiceController` can be used without a given `RouteProgress` or the `RouteProgress` can explicitly ignored so that it will not be added to the voice instruction.
* `RouteProgress` is now optional in `willSpeak` method of `VoiceControllerDelegate` if the `RouteProgress` in the `speak` method of the `RouteVoiceController is `nil`.
* Uses the `Locale` given in `RouteOptions` to create the corresponding `AVSpeechSynthesisVoice`.
* Removed setCamera() from updateCourseTracking()
* Added setCamera() to progressDidChange()
* Allow to customize rerouting logic by implementing RouteControllerDelegate#routeControllerGetDirections
* Add option to overwrite camera update via NavigationMapViewCourseTrackingDelegate#updateCamera
* Remove MapboxVoiceController and Mapbox Speech dependency. If you would like to use MapboxSpeech, you can copy the deleted MapboxVoiceController into your project.
* Updated MapLibre Native dependency to ios-v6.0.0 (https://github.com/maplibre/maplibre-native/releases/tag/ios-v6.0.0). Implementers need to change the prefix MGL to MLN for all MapLibre Native classes that are referenced.
* Only snap location to route if the location is within the `RouteControllerUserLocationSnappingDistance`
* Add support for Swift Package Manager while dropping Carthage and Cocoapods.
* Initialization no longer tries to add mapbox://mapbox.mapbox-streets-v7 to all mapstyles.
* Removed implicit default dependencies on MapBox tileservers by requiring explicit styles URLs in more places.
- Merged in <https://github.com/maplibre/maplibre-navigation-ios/pull/45>.
- BREAKING: Removed `MLNStyle` extensions referencing non-functioning MapBox styles, e.g. `MLNStyle.navigationGuidanceDayStyleURL`.
- Added `Day/NightStyle(styleURL:)` which takes an explicit URL to a hosting tileserver style.
- Added `Day/NightStyle(demoStyle: ())` as an explicit alternative when the user doesn't have a tileserver handy. This uses MapLibre's demo style and is intended for testing and demonstration use only.
- 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>
* 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.
- Upgraded dependencies to support iOS 12.0
* Upgrade minimum iOS version from 11.0 to 12.0.
* Upgraded dependencies to support iOS 12.0

## v1.0.7 (November 1, 2022)
- Rerouting logic changed
* Rerouting logic changed
- Routes that are found when requesting a new route that are slower but more than 90% the same geometry will get applied. This is done to account for traffic on the route that could change the ETA dramatically
- Added `rerouteReason` parameter in `didRerouteAlong` `RouteControllerDelegate` so the client can react accordingly
- Added option to skip check for rerouting in `RouteController` where route should have 10+mins left before fetching a new route, called `shouldCheckForRerouteInLastMinutes`
- Moved & renamed `RouteControllerProactiveReroutingInterval` to be an instance property of `RouteController` so the client can easily set this per route controller
- Added `shouldReturnTestingETAUpdateReroutes` property to `RouteController` as an easy way to test an ETA update client-side. It uses two of the same test-routes between `52.02224357,5.78149084` and `52.03924958,5.55054131` with different ETA's to easily see the ETA change happen in the client's UI
* Moved & renamed `RouteControllerProactiveReroutingInterval` to be an instance property of `RouteController` so the client can easily set this per route controller
* Added `shouldReturnTestingETAUpdateReroutes` property to `RouteController` as an easy way to test an ETA update client-side. It uses two of the same test-routes between `52.02224357,5.78149084` and `52.03924958,5.55054131` with different ETA's to easily see the ETA change happen in the client's UI

## v1.0.6 (October 5, 2022)

Expand Down
11 changes: 7 additions & 4 deletions MapboxNavigation/NavigationMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,18 @@ open class NavigationMapView: MLNMapView, UIGestureRecognizerDelegate {
}
}

// Track position on a frame by frame basis. Used for first location update and when resuming tracking mode
func enableFrameByFrameCourseViewTracking(for duration: TimeInterval) {
// MARK: - User Tracking

/**
Track position on a frame by frame basis. Used for first location update and when resuming tracking mode.
Call this method when you are doing custom zoom animations, this will make sure the puck stays on the route during these animations.
*/
@objc public func enableFrameByFrameCourseViewTracking(for duration: TimeInterval) {
NSObject.cancelPreviousPerformRequests(withTarget: self, selector: #selector(self.disableFrameByFramePositioning), object: nil)
perform(#selector(self.disableFrameByFramePositioning), with: nil, afterDelay: duration)
self.shouldPositionCourseViewFrameByFrame = true
}

// MARK: - User Tracking

@objc fileprivate func disableFrameByFramePositioning() {
self.shouldPositionCourseViewFrameByFrame = false
}
Expand Down

0 comments on commit 529f315

Please sign in to comment.