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 9123377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:19:29+00:00 2026-06-17T06:19:29+00:00

I am trying to direct my users to iOS 6 native maps for directions

  • 0

I am trying to direct my users to iOS 6 native maps for directions from their current location to a latitude, longitude location as follows:

MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:placeLocation addressDictionary:nil];
MKMapItem *destination = [[MKMapItem alloc] initWithPlacemark:placemark];
MKMapItem *currentLocation = [MKMapItem mapItemForCurrentLocation];
NSArray *mapItems = @[destination, currentLocation];
NSDictionary *options = @{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving, MKLaunchOptionsMapTypeKey: [NSNumber numberWithInteger:MKMapTypeStandard], MKLaunchOptionsShowsTrafficKey:@YES};
[MKMapItem openMapsWithItems:mapItems launchOptions:options];

I have set my simulator to my latitude and longitude. What is wrong with my code here?

  • 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-17T06:19:31+00:00Added an answer on June 17, 2026 at 6:19 am

    the code is fine and works for me GIVEN there is a route possible

    works when directions between currentLocation and destination can be given.
    if currentLocation is in the US, maps fails because it can’t navigate from germany to the us.
    but if the currentLocation is in europe too, the maps app works fine 🙂

    //placeMarkCoord fixed to germany
    MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(51.0, 10.0) addressDictionary:nil];
    MKMapItem *destination = [[MKMapItem alloc] initWithPlacemark:placemark];
    
    //currentLocation must be reachable from destination!
    //MKMapItem *currentLocation = [MKMapItem mapItemForCurrentLocation];
    placemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(51.0, 11.0) addressDictionary:nil];
    MKMapItem *currentLocation = [[MKMapItem alloc] initWithPlacemark:placemark];
    
    NSArray *mapItems = @[destination, currentLocation];
    NSDictionary *options = @{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving, MKLaunchOptionsMapTypeKey: [NSNumber numberWithInteger:MKMapTypeStandard], MKLaunchOptionsShowsTrafficKey:@YES};
    [MKMapItem openMapsWithItems:mapItems launchOptions:options];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add a search box to my page that will direct users
I'm trying to destroy a link from a User Show view. So from /users/1
I'm trying to let a user "make his own service". most direct method I
im trying to use direct store in Extjs heres the code to my store
I am trying to write a rule which says xyz.com/hotels_in_someplace will direct to xyz.com/test.php?place=someplace
I'm trying to modify a file in a zip-file using java.util.net As direct modification
I'm trying to load an image slider via AJAX. When typing in the direct
I found a couple of answers where users are using htaccess to prevent direct
I'm trying to implement a basic web server in Java. When I direct a
Hi I'm currently making an app for users to upload pics. I'm trying to

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.