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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:08:11+00:00 2026-06-01T06:08:11+00:00

Here I am facing a problem with the displaying of multiple pins at time

  • 0

Here I am facing a problem with the displaying of multiple pins at time on mapview. I am having 10 annotations with different location values instead the pins displaying at different places all are displayed at one point and here is my code for it

-(IBAction)searchMarinaAction
{
    MarinasListviewController *controller = [[MarinasListviewController alloc]initWithNibName:@"MarinasListviewController" bundle:nil];
    UIPopoverController *popoverView = [[UIPopoverController alloc]initWithContentViewController:controller];
    [popoverView setDelegate:self];

    marinasList = [controller.marinasListArray copy];
    NSMutableArray *pinsArray = [[NSMutableArray alloc]init];
    NSLog(@"\n marinas list count = %d",[marinasList count]);
    for(int i = 0; i < [marinasList count]; i++)
    {
        MarinaObject *obj = [marinasList objectAtIndex:i];
        NPAnnotation *annot = [[NPAnnotation alloc]init];
        annot.title = obj.marinaTitle;
        annot.subTitle = obj.marinaSubTitle;
        annot.marinaLocation = obj.marinaLocation;
        NSLog(@"\n %d. %@ , %@, %f, %f ",i, annot.title,     annot.subTitle,annot.marinaLocation.latitude,annot.marinaLocation.longitude);
        [pinsArray addObject:annot];

        isFromSearchMarina = YES;
        [annot release];
    }
    [mkView addAnnotations:pinsArray];
}



- (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id <MKAnnotation>)annotation{



    MKPinAnnotationView *pinView = (MKPinAnnotationView*)[mkView dequeueReusableAnnotationViewWithIdentifier:@"Prospects"];

    if(pinView == nil) {
        pinView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"Prospects"];
        pinView.pinColor = MKPinAnnotationColorGreen;
        pinView.animatesDrop = YES;
        pinView.canShowCallout = YES;
    } else {
        pinView.annotation = annotation;
    }
    return pinView;

  }

Can anyone please help Where I am doing wrong.

Thanks to all,
Monish

  • 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-01T06:08:12+00:00Added an answer on June 1, 2026 at 6:08 am

    Your annotation class, NPAnnotation, needs to implement the MKAnnotation, and for these you need to have a coordinate property.

    You need to call marinaLocation as coordinate, and it need to be a CLLocationCoordinate2D.

    Also your subTitle needs to be called subtitle.

    From apple documentation:

    An object that adopts this protocol must implement the coordinate
    property. The other methods of this protocol are optional.

    Best regards, and hope it help you.

    –

    You also can take a look at: How to show the annotations in a mapView

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

Sidebar

Related Questions

I'm facing a problem here, with HttpListener. When a request of the form http://user:password@example.com/
I am facing a problem on developing my web app, here is the description:
I'm here facing a problem with a Java web project. The project I'm working
Here I am facing a problem that I want to pass a dataset to
i am facing this problem here. i want to show item's name by getting
i am using AIX OS.here i am facing a problem that when ever the
Hope you all fine.I am facing some sort of problem while passing multiple parameters
im facing a problem regarding my .htaccess file here is the code within the
I'm facing a problem using IE here. I need to insert a form on
I'm facing a problem here, I was using this library UIDevice with UniqueIdentifier for

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.