Changes

Jump to: navigation, search

An Example iOS 6 iPad MKMapItem Application

61 bytes added, 19:54, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_IOS6_IPADios9_upgrade</googlehtmlet>
== 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>
<htmlet>adsdaqbox_flow</htmlet>
[[Image:ipad_ios_6_mapitem_running.png]]
<googlehtmlet>BUY_IOS6_IPADios9_upgrade</googlehtmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">

Navigation menu