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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:40:06+00:00 2026-05-24T10:40:06+00:00

I have a task to develop the application with map kit and web service

  • 0

I have a task to develop the application with map kit and web service of asp.net.

My problem is when I got the location from the web service. And according that location the pin is also setting to it’s located place.

But my problem is I have given the pin pop up on it. it is working when the user click on the pin it will show the pop up. but the pop up on the pin is not working. I have included all related code for the pin and pin pop up. but it is not working when I am clicking on that pin.

I am also adding the code to display the pin on map and message which I have given.

- (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id <MKAnnotation>)annotation
{
    NSLog(@"Controll comes here");

    if (annotation == mapView.userLocation) 
        return nil;

    MKPinAnnotationView *pin = (MKPinAnnotationView *) [mapView dequeueReusableAnnotationViewWithIdentifier: @"asdf"];

    if (pin == nil)
        pin = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier: @"asdf"] autorelease];

    else

    pin.annotation = annotation;
    pin.userInteractionEnabled = YES;
    UIButton *disclosureButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; 
    [disclosureButton setFrame:CGRectMake(0, 0, 30, 30)];

    pin.rightCalloutAccessoryView = disclosureButton;
    pin.pinColor = MKPinAnnotationColorRed;
    pin.animatesDrop = YES;
    [pin setEnabled:YES];
    [pin setCanShowCallout:YES];
    return pin;

}

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
    NSString *strTitle = [NSString stringWithFormat:@"%@",[lines objectAtIndex:i]];
    NSMutableDictionary *d;
    NSMutableArray *temp=[NSArray arrayWithArray:lat];

    //  NSArray *temp=[NSArray arrayWithArray:[NSArray arrayWithArray:[reports objectAtIndex:0]]];
    for (int k = 0; k< i -1; k++)
    {
        d = (NSMutableDictionary*)[temp objectAtIndex:k];
        NSString *strAddress = [NSString stringWithFormat:@"%@",[d valueForKey:@"comments"]];

        if([strAddress isEqualToString:strTitle]) {
            [self presentModalViewController:self.nxtDetailsVCtr animated:YES];
            [self.nxtDetailsVCtr.lblDetail setText:strAddress];     
            break;
        }


    }
}
  • 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-05-24T10:40:08+00:00Added an answer on May 24, 2026 at 10:40 am

    For that u need to implement the below code for that

    - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
    {
        NSString *strTitle = [NSString stringWithFormat:@"%@",[view.annotation title]];
        NSMutableDictionary *d;
        NSArray *temp=[NSArray arrayWithArray:[NSArray arrayWithArray:[reports objectAtIndex:0]]];
        for (int i = 0; i<[temp count]; i++)
        {
            d = (NSMutableDictionary*)[temp objectAtIndex:i];
            NSString *strAddress = [NSString stringWithFormat:@"%@",[d valueForKey:@"comments"]];
    
                if([strAddress isEqualToString:strTitle])
                {
                    if(!nxtDetails){
                       nxtDetails=[[MyCityDetails alloc] initWithNibName:@"MyCityDetails" bundle:nil];
                    }
                    NSLog(@"%@",[dForAnnotation valueForKey:@"report_types"]);
                    nxtDetails.dForAnnotation= dForAnnotation;
    nxtDetails.arForAnnotation=d;
                    [self.navigationController pushViewController:nxtDetails animated:YES];
                }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been given the task to design and develop a web application for
Here's a problem. Developers have some kind of a task (develop certain feature), which
I am quite new to web development and have a task to develop a
I have to develop an application using C#.net that has to be run once
I am assigned a task to develop a large scale social web application like
I have a task to develop a rails application following the model for routing.
I am new in android development. and i have task to develop the application.
I have a task to develop the application, with the help of the SQL
I have a WCF Service built with .NET Framework 3.5. I have a task
I have the task of choosing an XMPP server/client solution for an internal web

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.