¡@

Home 

2014/10/15 ¤U¤È 10:11:26

iphone Programming Glossary: mkmapitem

How Can I get Direction on an iPhone iOS 6 App in Xcode from A to B?

http://stackoverflow.com/questions/12636707/how-can-i-get-direction-on-an-iphone-ios-6-app-in-xcode-from-a-to-b

openURL url iphone xcode google maps mkmapview ios6 share improve this question I recommend using MKMapItem openMapsWithItems instead of opening the maps app via a URL in iOS 6. If you use a URL you will not be able to pass Current.. you use a URL you will not be able to pass Current Location and will lose the ability to do turn by turn navigation. MKMapItem has a specific item for current location that when passed will open Maps using Current Location as the source address thus.. address thus enabling turn by turn navigation. void openMapsWithDirectionsTo CLLocationCoordinate2D to Class itemClass MKMapItem class if itemClass itemClass respondsToSelector @selector openMapsWithItems launchOptions MKMapItem currentLocation MKMapItem..

iPhone SDK 6 Launching maps with voice navigation directions

http://stackoverflow.com/questions/13893093/iphone-sdk-6-launching-maps-with-voice-navigation-directions

iphone sdk 5.0 share improve this question With iOS 6 there's a new way to launch maps using openMapsWithItems in MKMapItem . Here's a snippet that I use that provides walking or driving directions from current location to the provided coordinates.. iOS 6.0 only MKPlacemark destPlace MKPlacemark alloc initWithCoordinate coordinate addressDictionary nil autorelease MKMapItem destMapItem MKMapItem alloc initWithPlacemark destPlace autorelease destMapItem.name stationItem.title NSArray mapItems.. destPlace MKPlacemark alloc initWithCoordinate coordinate addressDictionary nil autorelease MKMapItem destMapItem MKMapItem alloc initWithPlacemark destPlace autorelease destMapItem.name stationItem.title NSArray mapItems NSArray alloc initWithObjects..

How can I launch the Google Maps iPhone application from within my own native application?

http://stackoverflow.com/questions/30058/how-can-i-launch-the-google-maps-iphone-application-from-within-my-own-native-ap

q London should invoke the Google maps app. From iOS 6 you'll be invoking Apple's own Maps app. For this configure an MKMapItem object with the location you want to display and then send it the openInMapsWithLaunchOptions message. To start at the current.. you want to display and then send it the openInMapsWithLaunchOptions message. To start at the current location try MKMapItem mapItemForCurrentLocation openInMapsWithLaunchOptions nil You'll need to be linked against MapKit for this and it will prompt..

How to invoke iPhone Maps for Directions with Current Location as Start Address

http://stackoverflow.com/questions/576768/how-to-invoke-iphone-maps-for-directions-with-current-location-as-start-address

BOOL opened UIApplication sharedApplication openURL NSURL URLWithString url 2 To use Apple Maps you can use the new MKMapItem class for iOS 6. See the Apple API docs here Basically you will use something like this if routing to destination coordinates.. destination coordinates latlong MKPlacemark place MKPlacemark alloc initWithCoordinate latlong addressDictionary nil MKMapItem destination MKMapItem alloc initWithPlacemark place destination.name @ Name Here NSArray items NSArray alloc initWithObjects.. latlong MKPlacemark place MKPlacemark alloc initWithCoordinate latlong addressDictionary nil MKMapItem destination MKMapItem alloc initWithPlacemark place destination.name @ Name Here NSArray items NSArray alloc initWithObjects destination nil NSDictionary..