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

  • Home
  • SEARCH
  • 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 8995337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:36:24+00:00 2026-06-15T23:36:24+00:00

xcode How to open iOS 6 maps? How can I do this? thanks for

  • 0

xcode How to open iOS 6 maps? How can I do this?

thanks for the reply enter image description 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-15T23:36:25+00:00Added an answer on June 15, 2026 at 11:36 pm

    To open the map with a route, you can use the following:

    NSString *destinationAddress = @"Amsterdam";
    
    Class itemClass = [MKMapItem class];
    if (itemClass && [itemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)]) {
    
        CLGeocoder *geocoder = [[CLGeocoder alloc] init];
        [geocoder geocodeAddressString:destinationAddress completionHandler:^(NSArray *placemarks, NSError *error) {
            if([placemarks count] > 0) {
    
                MKPlacemark *placeMark = [[MKPlacemark alloc] initWithPlacemark:[placemarks objectAtIndex:0]];
    
                MKMapItem *mapItem = [[MKMapItem alloc]initWithPlacemark:placeMark];
    
                MKMapItem *mapItem2 = [MKMapItem mapItemForCurrentLocation];
    
    
                NSArray *mapItems = @[mapItem, mapItem2];
    
                NSDictionary *options = @{
            MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving,
            MKLaunchOptionsMapTypeKey:
                [NSNumber numberWithInteger:MKMapTypeStandard],
            MKLaunchOptionsShowsTrafficKey:@YES
                };
    
                [MKMapItem openMapsWithItems:mapItems launchOptions:options];
    
            } else {
                //error nothing found
            }
        }];
        return;
    } else {
    
        NSString *sourceAddress = [LocalizedCurrentLocation currentLocationStringForCurrentLanguage];
    
        NSString *urlToOpen = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%@&daddr=%@",
                     [sourceAddress stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                     [destinationAddress stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
    
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlToOpen]];
    }
    

    This opens the map application and checks if it is ios5 or ios6.

    For ios5 I use the LocalizedCurrentLocation from this post http://www.martip.net/blog/localized-current-location-string-for-iphone-apps

    For ios6 I use the CLGeocoder to get the placemark and then open the map with it and the current location.

    Remember to add CoreLocation.framework and MapKit.framework

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get this back to a file I can open with xcode?
How can I create a iPhone screenshot? When I open Xcode I go to
I don't understand why if I open a project in xcode I can use
I have installed XCode 4 for iOS 5 and when I open the organizer
When I M Trying To open Application With Xcode 4.2 With Ios 5 I
How would I go about creating an Xcode project for iOS that can be
I'm very surprised not to be able to open my Xcode project on another
XCode 4.31 crash when i try to open my project. I could open any
I am using XCode 4.3.2 and trying to open an already existing project based
I've tried to open local PDFs stored in the www/Documents folder in my XCode

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.