Using location-based information in your applications is a way to keep the user connected to the surrounding world. Whether you use this information for practical purposes (such as navigation) or for entertainment, location-based information can improve the overall user experience.
Location-based information in iOS comprises two pieces: location services and maps. Location services are provided by the Core Location framework, which provides Objective-C interfaces for obtaining information about the user’s location and heading. Maps are provided by the Map Kit framework, which supports both the display and annotation of maps similar to those found in the Maps application.
Map and location services provide a way for you to enhance user interactions. By incorporating geographic data into your applications, you can orient the user to the surrounding environment or help the user stay connected to other people nearby.
Location services is all about mobility and the fact that your application is running on a device that can go anywhere. Knowing the user’s geographic location can help you improve the quality of the information you offer, and in some cases it might even be at the heart of your application. Applications that offer navigation features use location services to monitor the user’s position and generate updates. And many other types of applications use location as a way of connecting nearby users socially.
Relevant Chapters: “Getting the User’s Location,” “Geocoding Location Data”
Heading services complement the basic location services by providing more precise information about which way a device is pointed. The most obvious use for this technology is for implementing a compass but this technology is also used to support augmented reality, games, and navigational applications. And even on devices that do not have a magnetometer—the hardware used to get precise heading information—information about the user’s course and speed are still available for applications that need it.
Relevant Chapters: “Getting Direction-Related Events”
Maps are a way to visualize geographical data in a way that is easy to understand. The Map Kit framework provides standard views that you can incorporate into your application and use to display information tied to specific geographic points. In addition, this framework provides the means to layer custom information on top of the map and have it scroll along with the rest of the map content.
Relevant Chapters: “Displaying Maps,” “Annotating Maps”
You do not have to read this entire document to use each of the technologies. The services provided by the Core Location and Map Kit frameworks are separate and can be used independent of other services. Therefore, the beginning of each chapter introduces the terminology and information you need to understand the corresponding technology followed by examples and task-related steps on how to use it. The only exception is the “Annotating Maps” chapter, which builds on the information presented in the “Displaying Maps” chapter.
For information about the classes of the Core Location framework, see Core Location Framework Reference.
For information about the classes of the Map Kit framework, see Map Kit Framework Reference.
Last updated: 2010-05-20