title: Multiple annotation color
body: <p>i have a map with multiple annotation on it. i was able to show the first and the last annotations. i want to give each annotation a different color.</p>
  
  <p>here is my code of how to insert my annotations</p>
  
  <pre><code>if(i&lt;1 || i &gt;object.count-2)            
  {    
          MyAnnotation* myAnnotation1=[[MyAnnotation alloc] init];                        
          myAnnotation1.coordinate=theCoordinate1;
          myAnnotation1.title=DEVNAME;
          myAnnotation1.subtitle=it.address;                        
          [mapView addAnnotation:myAnnotation1];                        
          [annotations addObject:myAnnotation1];                             
  }
  </code></pre>
  
  <p>the if condition is reading the index of the array to only drop the first and last annotation.</p>
  
  <p>and here is how do i drop the pins on the map...</p>
  
  <pre><code>-(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:
      (id &lt;MKAnnotation&gt;)annotation {
      MKPinAnnotationView *pinView = nil; 
      if(annotation != mapView.userLocation)  
      {
  
          static NSString* MyAnnotationIdentifier = @"MyAnnotationIdentifier";
          MKPinAnnotationView* customPinView = [[[MKPinAnnotationView alloc]
                                                 initWithAnnotation:annotation reuseIdentifier:MyAnnotationIdentifier] autorelease];
          customPinView.pinColor = MKPinAnnotationColorRed;
          customPinView.animatesDrop = YES;
          customPinView.canShowCallout = YES;
  
  
  
         UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
          customPinView.rightCalloutAccessoryView = rightButton;
  
          return customPinView;
      }
      else
      {
          pinView.annotation = annotation;
      }
      return pinView;
    }
  </code></pre>
  
  <p>how to different annotations color?</p>