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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class ViewController: UIViewController {
case .failure(let error):
print(error.localizedDescription)
case .success(let response):
guard let route = response.routes?.first, let strongSelf = self else {
guard let routes = response.routes, let strongSelf = self else {
return
}

Expand All @@ -123,11 +123,8 @@ class ViewController: UIViewController {
// Show the start button
strongSelf.startButton?.isHidden = false

// Draw the route on the map after creating it
strongSelf.drawRoute(route: route)

// Show destination waypoint on the map
strongSelf.navigationMapView.showWaypoints(on: route)
// Showcase the route and destination waypoint, and set camera
strongSelf.navigationMapView.showcase(routes, animated: true)
}
}
}
Expand Down