This chapter explained how to use the Map Kit framework to display the Google Maps in your iPhone application. You also saw how to use the Core Location framework to help you obtain your location information. Combining the Map Kit and the Core Location frameworks enables you to create very compelling location-based services.
EXERCISES
Answers to the exercises can be found in Appendix D.
WHAT YOU LEARNED IN THIS CHAPTER
TOPIC | KEY CONCEPTS |
Framework for displaying Google Maps | Map Kit |
Framework for obtaining geographical location | Core Location |
Class for displaying Google Maps | MKMapView |
Showing current location on the map | showsUserLocation |
Monitoring changes in the map | Implement the MKMapViewDelegate protocol. |
Changing the zoom level of the map | Set the latitudeDelta and longitudeDelta properties of the map. |
Monitoring changes in location | Implement the CLLocationManagerDelegate protocol. |
Getting location updates | Call the startUpdatingLocation method. |
Getting directional updates | Call the startUpdatingHeading method. |
Rotating the map | Embed the MapView in another View and rotate the MapView. |
Displaying annotations | Create a class that inherits from the MKAnnotation base class. |
18.118.162.111