From the course: Advanced iOS App Development: MapKit & Core Location

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Solution 7: The chosen path

Solution 7: The chosen path - iOS Tutorial

From the course: Advanced iOS App Development: MapKit & Core Location

Start my 1-month free trial

Solution 7: The chosen path

- [Instructor] In the last video, I told you that each step has a polyline associated with it. When you iterate through the steps in the selected path, add the polyline to the map. So I'm going to close the app up. I'm going to go back to find directions and all you have to do is just after this route description, add the polyline. So the line is self, mapView, add an overlay and the overlay, routeStep.polyline. Now run the code. Go to Chicago, hit Find, and you'll see the first path highlighted with the dotted default line. In Beverly Hills, the single path is highlighted.

Contents