-
Notifications
You must be signed in to change notification settings - Fork 313
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
Adding willArrive functionality to RouteController/NavigationService. #1847
Conversation
*/ | ||
|
||
@objc(navigationService:willArriveAtWaypoint:in:distance:) | ||
optional func navigationService(_ service: NavigationService, willArriveAt waypoint: Waypoint, in eta:TimeInterval, distance: CLLocationDistance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: avoid abbreviations. More importantly, “ETA” is ambiguous: in this case, it means the remaining number of seconds (the remaining portion of the estimated travel time), but people might also be inclined to interpret “ETA” as the time at the time of arrival.
optional func navigationService(_ service: NavigationService, willArriveAt waypoint: Waypoint, in eta:TimeInterval, distance: CLLocationDistance) | |
optional func navigationService(_ service: NavigationService, willArriveAt waypoint: Waypoint, after remainingTimeInterval: TimeInterval, distance: CLLocationDistance) |
CHANGELOG.md
Outdated
@@ -17,6 +17,7 @@ | |||
* Fixed a crash during turn-by-turn navigation. ([#1820](https://github.com/mapbox/mapbox-navigation-ios/pull/1820)) | |||
* Fixed a crash that could happen while simulating a route. ([#1820](https://github.com/mapbox/mapbox-navigation-ios/pull/1820)) | |||
* Fixed an issue causing MapboxVoiceController to speak instructions using VoiceOver instead of the Mapbox Voice API. ([#1830](https://github.com/mapbox/mapbox-navigation-ios/issues/1830)) | |||
* Added `RouterDelegate.router(_:willArriveAt:in:distance:)` to assist with preparations for arrival. ([#1847](https://github.com/mapbox/mapbox-navigation-ios/pull/1847)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Added `RouterDelegate.router(_:willArriveAt:in:distance:)` to assist with preparations for arrival. ([#1847](https://github.com/mapbox/mapbox-navigation-ios/pull/1847)) | |
* Added `RouterDelegate.router(_:willArriveAt:after:distance:)` to assist with preparations for arrival. ([#1847](https://github.com/mapbox/mapbox-navigation-ios/pull/1847)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will change changed to NavigationViewControllerDelegate.navigationViewController(_:willArriveAt:after:distance:)
since it's more relevant for most users.
*/ | ||
|
||
@objc(navigationViewController:willArriveAtWaypoint:in:distance:) | ||
optional func navigationViewController(_ navigationViewController: NavigationViewController, willArriveAt waypoint: Waypoint, in eta:TimeInterval, distance: CLLocationDistance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional func navigationViewController(_ navigationViewController: NavigationViewController, willArriveAt waypoint: Waypoint, in eta:TimeInterval, distance: CLLocationDistance) | |
optional func navigationViewController(_ navigationViewController: NavigationViewController, willArriveAt waypoint: Waypoint, after remainingTimeInterval: TimeInterval, distance: CLLocationDistance) |
@@ -48,6 +48,10 @@ public class NavigationServiceDelegateSpy: NavigationServiceDelegate { | |||
recentMessages.append(#function) | |||
} | |||
|
|||
public func navigationService(_ service: NavigationService, willArriveAt waypoint: Waypoint, in eta: TimeInterval, distance: CLLocationDistance) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public func navigationService(_ service: NavigationService, willArriveAt waypoint: Waypoint, in eta: TimeInterval, distance: CLLocationDistance) { | |
public func navigationService(_ service: NavigationService, willArriveAt waypoint: Waypoint, after remainingTimeInterval: TimeInterval, distance: CLLocationDistance) { |
Co-Authored-By: frederoni <bjorn.fredrik.karlsson@gmail.com>
Co-Authored-By: frederoni <bjorn.fredrik.karlsson@gmail.com>
Fixes #1844. Adds a new
router:willArriveAt:in:distance:
(and friends) mechanism.To-do:
/cc @mapbox/navigation-ios