Changes

Jump to: navigation, search
no edit summary
</pre>
Once initialized, the openInMapsWithLaunchOptions: method will open the map positioned at the designated location with an appropriate marker as illustrated in Figure 7 59-1:
<pre>
[[Image:iphone_ios_6_mkmapitem_example.png|MKMapItem running on an iOS 6 based iPhone]]
Figure 759-1
* '''MKLaunchOptionsMapSpanKey''' – An MKCoordinateSpan structure value designating the region that the map should display when launched.
* '''MKLaunchOptionsShowsTrafficKey''' – A Boolean value indicating whether or not traffic information should be superimposed over the map when it is launched.
The following code, for example, opens a map in satellite mode with traffic data displayed and includes turn-by-turn driving directions between two map items, the result of which is illustrated in Figure 759-2:
<pre>
[[Image:iphone_ios6_turn_by_turn.png|iPhone iOS 6 MKMapItem turn-by-turn directions]]
Figure 759-2
== Adding Item Details to an MKMapItem ==
When a location is marked on a map, the address is displayed together with a blue arrow which, when selected, displays an information card for that location. Figure 759-3 shows the location marker for the Empire State Building alongside the information card displayed when that location marker is selected:
[[Image:iphone_ios6_mapview_marker_info.png|An iOS 6 MKMapItem with an Info Marker]]
Figure 759-3
[[Image:iphone_ios6_mapitem_with_properties.png|An iOS 6 iPhone MKMapItem with properties]]
Figure 759-4

Navigation menu