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

Start & Stop Navigation in existing Map #54

Merged
merged 48 commits into from
Jun 20, 2024

Conversation

Patrick-Kladek
Copy link
Contributor

Description

A long wanted feature was to interact with a map and later on start a navigation without presenting another map on top. This PR finally allows this. In retrospect it was quite simple, In NavigationViewController the route property is now optional and there are additional functions added to start & stop the navigation.

Open Tasks

  • Add Example Project to iterate faster
  • make route optional & add start/stopp methods
  • correctly show & hide UI for navigation
  • Remove Feedback form (from Mapbox, MapLibre doesn't have servers to send feedback)
  • Don't show EndOfRouteViewController after navigation finished, instead call delegate

Infos for Reviewer

In the Example, the route calculation is done with Mapbox, users need a mapbox account and add the api-key in Secrets.xcconfig file. This file ignores changes, so the api-key should not leak into the git repo.

A nice side effect of this Task is, that we to got rid of some implicitly unwrapped optionals.

Breaking Changes

  • Feedback Button was removed, this button didn't work as it was a Mapbox feature and MapLibre doesn't have any servers. If this button is needed, it should be added manually.
  • No End of Route View is presented on arrival. If it's needed, it should be presented manually in navigationViewControllerDidFinish() delegate method. The EndOfRouteViewController is still bundled in the project.

…n-ios into feature/example

# Conflicts:
#	MapboxNavigation/NavigationView.swift
#	MapboxNavigation/NavigationViewController.swift
#	MapboxNavigation/RouteMapViewController.swift
…tion-ios into feature/example

# Conflicts:
#	MapboxNavigation/NavigationViewController.swift
@Patrick-Kladek
Copy link
Contributor Author

Tests are passing now

@Patrick-Kladek
Copy link
Contributor Author

The plan was to get this merged by Monday but was delayed because of #58. Now the week nearly passed and I can't see any progress. Can we please get this merged today, I don't see any blockers or risks as we have a working 3.0 release.

Copy link
Collaborator

@boldtrn boldtrn left a comment

Choose a reason for hiding this comment

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

@Patrick-Kladek, my understanding was that we first merge #58 and then #54.

I am fine with merging this PR first, I haven't seen any issues when running the code or when reviewing it.

@Patrick-Kladek
Copy link
Contributor Author

@boldtrn thanks for approving. It's getting a bit frustrating for me as there is no progress in #58 in the last 2 days and thats why this here is on hold. But maybe should have poked in the other PR.

@boldtrn
Copy link
Collaborator

boldtrn commented Jun 20, 2024

No worries, I can understand. I am currently reviewing this repo with priority already. Reviews take their time if you do them seriously, so It's not always possible to do something on the same day. Feel free to merge this PR or wait on #58. I am fine with either way.

Maybe @michaelkirk would like to chime in as well, I think he is in the US timezone, so maybe let's give him the opportunity to give this one more check as well?

@michaelkirk
Copy link
Collaborator

LGTM - I am OK with merging this before #58. Since the end of route logic is also changing with this PR, I'll probably want to re-evaluate how #58 gets merged anyway.

To set future expectations, it will not be uncommon for me to take more than 2 days to respond to activity on Github (especially when one is a holiday for me, or the weekend). One way to speed up the review process in the future will be to try hard to have changes be as focused as possible on the critical changes.

For my own project, I am running a fork that has my own PR's merged. It requires a bit of extra upkeep / rebase work, but it allows me to work at my own pace without feeling "held back" too much by the review process.

@hactar
Copy link
Collaborator

hactar commented Jun 20, 2024

Alright, we have 3 approvals, I'm gonna do the honors. Thanks @Patrick-Kladek for the contributions and iterations. And thanks for all coding and reviewing contributions, I know this wasn't a small change ❤️

@hactar hactar merged commit 8fb6359 into maplibre:main Jun 20, 2024
2 checks passed
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 20, 2024
After a tough rebase on top of maplibre#54, this branch doesn't work.
The EORVC is not presented. My understanding is that I'm the only one
currently working on the repository that even uses this VC, so maybe
it's a waste of time to try to upstream my efforts there anyway.
michaelkirk added a commit that referenced this pull request Jun 20, 2024
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 24, 2024
…c view

Note this was cherry-picked, and no longer works due to change in maplibre#54
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 24, 2024
…c view

Note this was cherry-picked, and no longer works due to change in maplibre#54
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 24, 2024
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 24, 2024
FIXES maplibre#57 - by rewriting EORVC as programmatic VC rather than storyboard.
FIXES maplibre#62 - Omitted the "Rate this route" feedback while rewriting the EORVC.

Note this was cherry-picked, and no longer works due to change in maplibre#54
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 24, 2024
Where possible, the particulars of presentation were copied from
b790f96 (aka before maplibre#54).
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 24, 2024
Where possible, the particulars of presentation were copied from
b790f96 (aka before maplibre#54).
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 25, 2024
Prior to maplibre#54, the NavigationViewController could only be used modally.

With maplibre#54, you can switch between "map mode" and "navigation mode". To do
so, an animation was introduced for the sake of smoothly transitioning from "map mode" to "navigation mode".

However, if you are still using the NavigationViewController modally,
this animation might interfere with other things you were doing - like
setting the camera.
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 25, 2024
Prior to maplibre#54, the NavigationViewController could only be used modally.

With maplibre#54, you can switch between "map mode" and "navigation mode". To do
so, an animation was introduced for the sake of smoothly transitioning from "map mode" to "navigation mode".

However, if you are still using the NavigationViewController modally,
this animation might interfere with other things you were doing - like
setting the camera.
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 27, 2024
FIXES maplibre#57 - by rewriting EORVC as programmatic VC rather than storyboard.
FIXES maplibre#62 - Omitted the "Rate this route" feedback while rewriting the EORVC.

Note this was cherry-picked, and no longer works due to change in maplibre#54
michaelkirk added a commit to michaelkirk/maplibre-navigation-ios that referenced this pull request Jun 27, 2024
Where possible, the particulars of presentation were copied from
b790f96 (aka before maplibre#54).
michaelkirk added a commit that referenced this pull request Jun 27, 2024
FIXES #57 - by rewriting EORVC as programmatic VC rather than storyboard.
FIXES #62 - Omitted the "Rate this route" feedback while rewriting the EORVC.

Note this was cherry-picked, and no longer works due to change in #54
michaelkirk added a commit that referenced this pull request Jun 27, 2024
Where possible, the particulars of presentation were copied from
b790f96 (aka before #54).
@Patrick-Kladek Patrick-Kladek mentioned this pull request Jul 2, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants