Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9005949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:16:58+00:00 2026-06-16T01:16:58+00:00

I am trying to launch the maps app from my iPhone SDK app. Right

  • 0

I am trying to launch the maps app from my iPhone SDK app. Right now I can launch the maps app with directions but it goes to an overview of the directions and doesn’t use Siri and the voice navigation to give turn by turn directions.

currently I have a button that launches this code…

NSString *address = viewedObject.addressFull;
NSString *url = [NSString stringWithFormat: @"http://maps.apple.com/maps?saddr=%f,%f&daddr=%@", here.latitude, here.longitude, [address stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:16:59+00:00Added an answer on June 16, 2026 at 1:16 am

    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 = [[[NSArray alloc] initWithObjects: destMapItem, nil] autorelease];
    NSDictionary* options = [NSDictionary dictionaryWithObjectsAndKeys:
                                     walking ? MKLaunchOptionsDirectionsModeWalking : MKLaunchOptionsDirectionsModeDriving,
                                     MKLaunchOptionsDirectionsModeKey, nil];
    [MKMapItem openMapsWithItems:mapItems launchOptions:options];
    

    The way you are doing it, which you still have to do if running on pre-iOS 6 devices, you need to include the dirflg in the URL to request walking or driving directions:

    // pre iOS 6 code
    NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f&dirflg=%c",
        currentLocation.coordinate.latitude,
        currentLocation.coordinate.longitude,
        destination.coordinate.latitude,
        destination.coordinate.longitude,
        walking ? 'w' : 'd'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to launch google maps from my iPhone application. The launching part works
I am trying to launch Google maps app from my app. In the maps
I am trying to launch the Main Activity from a broadcast receiver. Can anyone
I am trying to launch explorer programmatically from my .Net CF Window application. But
I'm trying to launch embedded Youtube videos from a UIWebView, but get this error
I'm trying to find a way to launch the maps app, with lon/lat and
I'm trying to launch an external program from my java swing app using this:
I am trying to launch a dialogue from a non activity java class. Can
I'm trying to launch VB application from Java, but I'm getting runtime error: Exception
I'm trying to launch a Java app from a C++ app using the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.