Changes

Jump to: navigation, search

An Example iOS 6 iPad MKMapItem Application

1 byte added, 21:08, 17 December 2012
Converting the Destination using Forward Geocoding
== Converting the Destination using Forward Geocoding ==
When the user touches the button in the user interface, the getDirections: method will be able to extract the address information from the text fields. The objective will be to create an MKPlacemark object to contain this location. As outlined in [[Integrating Maps into iPad iOS 6 Application Applications using MKMapItem]], an MKPlacemark instance requires the longitude and latitude of an address before it can be instantiated. The first step in the getDirections: method is to perform a forward geocode translation of the address. Before doing so, however, it is necessary to declare a property in the MapItemViewController.h file in which to store these coordinates once they have been calculated. This will, in turn, require that the <CoreLocation/CoreLocation.h> file be imported. Now is also an opportune time to import the <MapKit/MapKit.h> and <AddressBook/AddressBook.h> files, both of which will be required later in the chapter:
<pre>

Navigation menu