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.

Core Location data types

Core Location data types - iOS Tutorial

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

Start my 1-month free trial

Core Location data types

- [Narrator] Now that you've learned what you need to know about coordinates, let's go into frameworks and data types. There's two frameworks that work together, MapKit and CoreLocation. MapKit displays and annotates maps, and CoreLocation does all the GPS and location math. We'll go deeper into CoreLocation later. For both, you'll need to understand the CoreLocation data types. Both CoreLocation's GPS functions and MapKit will be using these classes, structures, and types. We've been talking about coordinates, and that's the first struct we'll learn. CLLocatoinCoordination2d is the latitude and longitude of a location. The latitude and longitude are of type CLLocationDegrees, which is a TypeAlias of double. You'll initialize a CLLocationCoordinate2d with the statement CLLocationCoordinate2d latitude comma longitude, specifying the latitude and longitude. The core class of core location is CLLocation which stores the 3D coordinate. While core location has several attributes, we'll…

Contents