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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:11:32+00:00 2026-06-12T18:11:32+00:00

So I have set my app to search for the user’s location upon pressing

  • 0

So I have set my app to search for the user’s location upon pressing on a button.

-(IBAction)getLocation {
mapview.showsUserLocation = YES;}

Then I have set a Map Annotation as well to a certain location upon loading of the map view using this

- (void)viewDidLoad{
     [super viewDidLoad];
// Do any additional setup after loading the view.

     [mapview setMapType:MKMapTypeStandard];
     [mapview setZoomEnabled:YES];
     [mapview setScrollEnabled:YES];

     MKCoordinateRegion region = { {0.0, 0.0 }, {0.0, 0.0 } };
     region.center.latitude = 123;
     region.center.longitude = 123;
     region.span.longitudeDelta = 0.01f;
     region.span.latitudeDelta = 0.01f;
     [mapview setRegion:region animated:YES];

     NewClass *ann = [[NewClass alloc] init];
     ann.title = @"Place to go to";
     ann.subtitle = @"subtitle";
     ann.coordinate = region.center;
     [mapview addAnnotation:ann];

}

Is it possible to be able to put a “Directions to Here” button to my annotation using MapKit? Any help would be awesome! Thanks!

  • 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-12T18:11:33+00:00Added an answer on June 12, 2026 at 6:11 pm

    To add the callout accessory, you have to follow the instruction from Anna Karenina.

    To draw the route itself, you have to first obtain the route, there are plenty of excellent APIs that will give you the route between two given points, even allowing you to set params like if the kind of routes you want to include. Google Directions API is pretty impressive on that regard. You should check it.

    Then you have to draw the route itself with MKPolyline. You can check a toy app i put together a few months ago to show how to do this.

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

Sidebar

Related Questions

In my rails app I have user, school, and course models. I have set
I have a search textbox on silverlight app where user types in search term
I have a search field in my app and I have set the return
I have a button in an app labelled How to search, the referencing outlet
I have set up an app that is registered for remote notifications. - (void)application:(UIApplication*)application
I have an app set up where I convert an NSString into an array
I have terminal.app set to accept utf-8 and in bash I can type unicode
I have set up a UITableView-based app, which has a .plist for holding the
I have a tableview in my app and I have set tint=1.0 . In
I have an app with four activities. I have set the intent-filter on one

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.