سؤال

Google Map is now available in Appstore for IOS 6. I have a application which utilises MAPKIT and WebView to show Driving direction using Google webservices. For showing Route in Native Apple MAP app, i use codes similar to this..

MKMapItem *mapItem = [[MKMapItem alloc]initWithPlacemark:place];
NSDictionary *options = @{
MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving
};
[mapItem openInMapsWithLaunchOptions:options];

I want to show Route to the user in the New Google MaP App installed on user device, embeed its UI within a View in my app.

Do guide me.

هل كانت مفيدة؟

المحلول

Goole have released latest API for IOS 6.0 and up.

For that follow the step below

  1. You have to registered your app and get the keys from Map IOS access.
  2. Refer the following link for further detail New way to add google maps in iOS 6 app

نصائح أخرى

For displaying the directions within the GoogleMaps app, using the new GoogleMaps URL scheme along the lines of:

comgooglemaps://?saddr=Google+Inc,+8th+Avenue,+New+York,+NY&daddr=John+F.+Kennedy+International+Airport,+Van+Wyck+Expressway,+Jamaica,+New+York&directionsmode=transit

Taken from the documentation should help you. A short browse from there, you will also notice that Google have released an SDK for the new GoogleMaps, with access tokens being rolled out slowly. Doc

  • seemed to cut off the end of my answer, but @Hi Ren has filled in the end with the link to the documentation to the new SDK.
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top