SUMMARY

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

  1. Name the property of the MKMapView class that enables you to show your current location on the map.
  2. Name the protocol that you need to implement in order to monitor changes in your map.
  3. Name the method that you need to call to start updating your location.
  4. Name the method that you need to call to start updating your heading.
  5. Name the class responsible for reverse geocoding.

    Answers to the exercises can be found in Appendix D.

image 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 ...

Get Beginning iOS 5 Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.