From the course: Advanced iOS App Development: MapKit & Core Location
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Request directions - iOS Tutorial
From the course: Advanced iOS App Development: MapKit & Core Location
Request directions
- [Narrator] We've found several pizza restaurants, but how do we get to them? You can get directions between two points with the MK direction service. The service checks with Apple servers to get what they believe to be the best route to get to your destination. We'll find directions between the two Chicago and two Beverley Hills restaurants. To get directions you need to make a request. Requests are the MK directions request object. At a minimum you'll need the source point, which I'll call the start point and a destination point. These two points are map items, not coordinates, so they work well with searches. Stop the app. Go to the view controller and head to the directions mark. Here we'll make a new function called find directions. We'll have a start point and just because we like to have it that way I'm going to use coordinates because my app happens to have a lot of coordinates running around. We'll have a destination. And generally these things help a lot if you actually put…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Request directions6m 27s
-
(Locked)
Display graphic directions7m 38s
-
(Locked)
Display step-by-step directions6m 27s
-
(Locked)
Challenge 7: The chosen path27s
-
(Locked)
Solution 7: The chosen path1m 2s
-
(Locked)
Launching the maps app6m 34s
-
(Locked)
Final challenge: Transit ETA annotation45s
-
(Locked)
Final solution: Transit ETA annotation6m 14s
-
(Locked)
-