Determine a user's heading from current position data, in this iOS Core Location challenge.
(cymbals crashing)…- Besides your coord and altitude, the CLLocation Class…has a few more properties which…are useful for devices in motion.…You can get heading and speed data for your points as well,…which we're going to look at in the next challenge.…Heading is the direction the device has traveled…from the last point to this point.…It uses position changes to figure out your heading…and places it in a property course.…Course is a type CLLocationDirection.…It's a value in degrees.…It may give a negative value when it can't give a heading,…so you may want to watch for that.…
Speed is type CLLocationSpeed,…measured in meters per second.…You may need to convert this to a measurement system…that makes sense for your app, such as…miles per hour, where you multiply by 2.23694,…or kilometers per hour, where you multiply by 3.6.…Now it's your turn.…Make a string that has heading and speed data…in miles per hour or kilometers per hour, your choice.…Then print that to the console after the coordinate data.…Go ahead and try it out.…
- 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
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.