Use MKroute to display step-by-step instructions.
- [Instructor] Remember I said there were two properties…that you could use for directions.…You've seen the poly line.…Let's look at the other one, the steps.…Go ahead and shut down the app while we're at it.…And steps is an array of MK route step,…which contains everything you need to know…about one step in the directions,…including a very useful poly line for the step.…The instructions themselves, in natural language,…and the distance.…We'll place these instructions in the history text…of a destination annotation.…
Head over to the findDirections method.…We'll need a coordinate of the destination.…After the loop for route description,…which I'm going to change to a var while I'm at it,…'cause I'm going to use this in a second.…Add let destination…equal...…response.destination.placemark.coordinate.…I'm going to use the first route as my route…and copy and paste the route description,…adding some new lines at the end of it…and changing the let to var.…
So I'm going to take this line I just did up here.…I'm going to cut it actually.…
- Getting coordinates from the web
- Working with Core Location data types and regions
- Creating a map in 2D, 3D, satellite, and flyover views
- Adding annotations
- Adding overlays
- Finding the current location
- Tracking heading, speed, and region
- Searching for locations
- Requesting and displaying directions
Skill Level Advanced
1. Basic Map and Location Concepts
5. Current Location
6. Heading, Speed, and Regions
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.