Join Steven Lipton for an in-depth discussion in this video Final solution: Transit ETA annotation, part of Advanced iOS App Development: MapKit & Core Location.
(tingly music)…- [Narrator] I'll start this last solution to the challenges…by commenting out the open maps.…Now just under the if for transit,…I'll calculate the ETA with directions…dot calculate ETA…and I'll launch that handler.…Again I'll make this a response,…this an error,…and then I'll go into the code.…
I'm going to make an annotation first,…let annotation equal pizza annotation.…The coordinate will be the destination.…The title will be destination.…
And the subtitle will be no transit available.…Then once you've got that set up, unwrap the response.…In that, change the annotation subtitle.…
I'm going to format this a little nicer…than I have in the past and use a string and do format,…percent four point two F will do a two digit number.…And the value for that will be response,…expected travel time divided by 60…because it's found in seconds.…
I'll tag this annotation as public transportation…in the annotations identifier.…This way I know to do something different with the button.…So we're going to do annotation dot identifier equals transit,…
- 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 Intermediate
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
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.