Skip to content

Use showcase(_:animated:) method to display route and destination for tutorial #143

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jill-cardamon
Copy link
Contributor

This PR changes how we display the route and destination waypoint in the tutorial app. Previously, developers were shown

how to use the individual NavigationMapView.show(_:legIndex:) and NavigationMapView.showWaypoints(on:legIndex:) methods, but it is better to show how to use `NavigationMapView.showcase(_:animated:) which zooms the map to fit the route. We’ve gotten some feedback from developers who were expecting that behavior but didn’t know how to get it: mapbox/ask-navigation#43 (comment).

from comment.

@jill-cardamon jill-cardamon requested a review from 1ec5 September 27, 2021 14:52
@jill-cardamon jill-cardamon self-assigned this Sep 27, 2021
@jill-cardamon jill-cardamon added this to the v2.0.0 (GA) milestone Sep 27, 2021
// Show destination waypoint on the map
strongSelf.navigationMapView.showWaypoints(on: route)
// Showcase the route and destination waypoint, and set camera
strongSelf.navigationMapView.showcase([route], animated: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

While we’re at it, we might as well showcase all the routes in response.routes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, thanks for the suggestion. I'll introduce navigationMapView(_ :didSelect:) delegate method, so the user can toggle between them.

@MaximAlien MaximAlien modified the milestones: v2.0, v2.1 Oct 21, 2021
@MaximAlien
Copy link
Contributor

@jill-cardamon, are we ready to merge this one? Looks like everything is ready here.

@MaximAlien MaximAlien removed this from the v2.1 milestone Apr 6, 2022
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.

3 participants