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

Adding willArrive functionality to RouteController/NavigationService. #1847

Merged
merged 11 commits into from
Nov 22, 2018

Conversation

JThramer
Copy link
Contributor

@JThramer JThramer commented Nov 20, 2018

Please stand clear of the doors. Por favor, mantengase alejado de las puertas.

Fixes #1844. Adds a new router:willArriveAt:in:distance: (and friends) mechanism.

To-do:

  • Write changelog

/cc @mapbox/navigation-ios

@JThramer JThramer added feature New feature request. release blocker Needs to be resolved before the release. 🤖 TDD labels Nov 20, 2018
@JThramer JThramer added this to the v0.25.0 milestone Nov 20, 2018
@JThramer JThramer self-assigned this Nov 20, 2018
*/

@objc(navigationService:willArriveAtWaypoint:in:distance:)
optional func navigationService(_ service: NavigationService, willArriveAt waypoint: Waypoint, in eta:TimeInterval, distance: CLLocationDistance)
Copy link
Contributor

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.

Suggested change
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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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))

Copy link
Contributor

@frederoni frederoni Nov 22, 2018

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.

MapboxCoreNavigation/NavigationServiceDelegate.swift Outdated Show resolved Hide resolved
MapboxNavigation/NavigationViewController.swift Outdated Show resolved Hide resolved
*/

@objc(navigationViewController:willArriveAtWaypoint:in:distance:)
optional func navigationViewController(_ navigationViewController: NavigationViewController, willArriveAt waypoint: Waypoint, in eta:TimeInterval, distance: CLLocationDistance)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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) {

@frederoni frederoni self-assigned this Nov 22, 2018
frederoni and others added 4 commits November 22, 2018 15:15
@frederoni frederoni merged commit cb4533a into master Nov 22, 2018
@1ec5 1ec5 deleted the jerrad/will-arrive branch December 5, 2019 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request. release blocker Needs to be resolved before the release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants