Chapter 5. Working with the Location Services and the MapKit Frameworks

In this chapter we will cover:

  • Adding the CoreLocation and MapKit frameworks
  • Building a simple CoreLocation application
  • Determining the current GPS location
  • Adding and working with the MapView control
  • Adding overlay regions to the map
  • Adding annotation placeholders to the map
  • Reversing geocode address information
  • Working with the different map types

Introduction

In this chapter we will be taking a closer look at how we can use the CoreLocation and MapKit frameworks to determine the location of the user. The MapKit framework is based on both the Google Earth and Google Maps data, as well as the APIs that provide developers with a simple mechanism of integrating detailed and interactive mapping capabilities into their own applications.

The core element of the MapKit framework is the MKMapView class. This class is a subclass of UIView that provides a canvas onto which map and/or satellite information is presented to the user. We will also learn how we can add placeholders directly onto the map and create annotations for these.

Finally, we will learn how we can use the CLGeoLocation class to apply reverse geocoding of the map coordinates to display location information, as well as applying the different types of map views.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset