title: how to handle multiple pins are going to dropped at a one longitude & latitude in iphone sdk?
body: <p>I have one task to develop application with map-kit.<br>
  I am getting multiple pins from server and one pin i have to drop from user current location. This user current location pin should be green &amp; other pins which are coming from server should be in another color.How can i do this??</p>
  
  <p>and another question is i am getting some pins on one another because there latitude &amp; longitude have some minor differences. so at that particular point where the pins are going to be dropped on one another that point i want to give one button (on pin pop up window) which handle the minor difference of lat &amp; long pins means the button tells next pin &amp; as soon as the button pressed the pop up window should go on another pin which is not already selected &amp; open its pop up window which also tells next pin. how can i do this??</p>
  
  <p>i am using code like this for creating pin </p>
  
  <p>for getting user loacation pin</p>
  
  <pre><code>        Place* current = [[[Place alloc] init] autorelease];
      current.name = @"You are here.";
      current.latitude = coordinate.latitude;
      current.longitude = coordinate.longitude;
      PlaceMark *from = [[[PlaceMark alloc] initWithPlace:current] autorelease];              
      [mapView addAnnotation:from];
  </code></pre>
  
  <p>for getting server location pin.</p>
  
  <pre><code>    int s=1;
      for (j=0 ; j &lt; i - 1   ; j++) 
      {
          //points = [[NSString alloc] initWithFormat:@"point%d",s];
          reports = [NSArray arrayWithArray:lat];
          NSString *titles = [[NSString alloc] initWithFormat:@"%@",[tit objectAtIndex:j]];
          NSString *description = [[NSString alloc] initWithFormat:@"%@",[des objectAtIndex:j]];
          float latitude=[[lat objectAtIndex:j] floatValue];
          float longitude=[[lon objectAtIndex:j] floatValue];
          Place* home = [[[Place alloc] init] autorelease];
          home.name = [NSString stringWithFormat:@"%@",titles];
          home.description = [NSString stringWithFormat:@"%@",description];
          home.latitude = latitude;
          home.longitude = longitude;
          PlaceMark *from = [[[PlaceMark alloc] initWithPlace:home] autorelease];             [mapView addAnnotation:from];
          s++;
          [self centerMap];
      }
  </code></pre>
  
  <p>this code for creating there popup window.</p>
  
  <pre><code>- (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id &lt;MKAnnotation&gt;)annotation{
  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;}
  </code></pre>
  
  <p>this code for handle there events means pin is calling the button action.</p>
  
  <pre><code> - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
  { nslog (do something)
  }
  </code></pre>
  
  <p>My all codes are working properly. i want just answer of above given questions..pls help me</p>