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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:29:50+00:00 2026-06-12T09:29:50+00:00

I need to display a MKMapView with more than 4 locations with different Annotations

  • 0

I need to display a MKMapView with more than 4 locations with different Annotations and a route connecting the locations. I have tried to display the multiple locations inside a MKMapView but i still not able to find out on how to connect the locations with a route. I am also trying to get this checked if i have implemented it in a right way. I have created a “CLLocationCoordinate2D” and then added a lat and long similarly for 4 points. I have created a custom object which implements MKAnnotation and returning a location .

CLLocationCoordinate2D coordinate1 = CLLocationCoordinate2DMake(40.7180583 ,-74.007109);
CLLocationCoordinate2D coordinate2 = CLLocationCoordinate2DMake(40.716355 ,-74.006816);
CLLocationCoordinate2D coordinate3 = CLLocationCoordinate2DMake(40.715281 ,-74.005485);
CLLocationCoordinate2D coordinate4 = CLLocationCoordinate2DMake(40.71559 ,-74.003114);

AnnotationPoints *location1 = [[AnnotationPoints alloc] initWithCoordinate:coordinate1];
AnnotationPoints *location2 = [[AnnotationPoints alloc] initWithCoordinate:coordinate2];
AnnotationPoints *location3 = [[AnnotationPoints alloc] initWithCoordinate:coordinate3];
AnnotationPoints *location4 = [[AnnotationPoints alloc] initWithCoordinate:coordinate4];

NSArray *poiArray = [[NSArray alloc] initWithObjects:location1,location2,location3,location4,nil];
    [mapView addAnnotations:poiArray];

//Inside the Annotation Class initWithCoordinate Method is implemented this way:-
-(id)initWithCoordinate:(CLLocationCoordinate2D) c{
    coordinate=c;
    NSLog(@"%f,%f",c.latitude,c.longitude);
    return self;
}

My concern here is i need to create a Annotation Point for every Location. Is there any alternative that i can load all the points at a single place. And another difficulty here is the route connecting all the multiple points. Any help on this? Thanks a lot

  • 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-12T09:29:51+00:00Added an answer on June 12, 2026 at 9:29 am

    The way you are adding the annotations is fine.
    Not sure what your concern is and what you mean by “all the points at a single place”.
    If you want pins/annotations at several places, you have to create a separate annotation object for each place.

    Drawing a route connecting those locations requires creating an overlay (not an “annotation”).
    You want to add an MKPolyline to the map for which you will specify the list of coordinates.

    To draw the polyline, you don’t need to also add annotations at each coordinate (but you could if you want to).

    Creating and adding an MKPolyline and its corresponding MKPolylineView is very similar to MKPolygon and MKPolygonView. See this question for an example:

    iPhone MKMapView – MKPolygon Issues

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

Sidebar

Related Questions

I need to display image and one button on fancybox popup but I can't
I need to display array of images in a single view which have various
I currently need to display a boat/cruise ship route in a MapView, something like
I have a position, which I need to display. The format is like: lat:
I have a List of string and I need display the values of this
I need to display a text on Mkmapview for example 100 meters, i know
i have the next list: SortedList<Decimal, KeyValuePair<string,string>> datos; And i need display this in
I need to display an arbitrarily-sized image inside a fixed-size block. The image needs
I need to display a UIWebView that shows images that have been downloaded by
I need to display an MKOverlay on a map, but can't get it 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.