views:

963

answers:

4

I'm adding several annotations to a MapView and using a custom image instead of the default pins. I am using the viewForAnnotation delegate method to set the custom image like this:

view.image = [UIImage imageNamed:@"placemark.png"];

And I've also tried:

[(MKPinAnnotationView *)view setImage:[UIImage imageNamed:@"placemark.png"]];

Now, these both set the image just fine. But when an annotation is either tapped or the mapType changes to Satellite or Hybrid, it resets back to the red pin image. What am I missing?

A: 

I think I got it. I ended up having to subclass MKAnnotationView.

Kevin Cupp
A: 

it would be nice if you would write a little bit more or even throw some code - unless you would be satisfied with "you should subclass MKAnnotationView" answer..

shw
Sure, this would be enough to get me going. But here's a good link a quick Google search brought me, for posterity: http://forums.pragprog.com/forums/135/topics/3049
Kevin Cupp
A: 

Hi kavin I am trying to put multiple pin on map with the help of local sqlite but getting error all the time

can you please give sample code on this

STUPID PROGRAMMER