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.
Distance - iOS Tutorial
From the course: Advanced iOS App Development: MapKit & Core Location
Distance
- [Instructor] I lied a little about MapKit's regions being a rectangle and Core Location regions being a circle. More accurately, their rectangles are circles in planar geometry. The world is a globe, and that means these are global geometry, not planar. For small distances such as a kilometer or a mile, you won't be able to tell the difference. But there will be accuracy errors creeping in as you get bigger distances. Let's look at why. I'll use a pizza slice here to help me out. The pizza slice has an angle, which could be our latitude or longitude. If I draw a straight line against this angle, as we have with flat planar geometry, from one edge of the pizza to the other, we have a distance. That distance, however, cuts off some crust. While not everybody likes the crust, I happen to like all my pizza. On a circle, there's a lot longer distance along the outside of the crust. On a globe, that means an error in your distances between two points. Core Location and Core Maps assumes…
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.