In terms of the image being off center, two thoughts:
I generally use
MKAnnotationView
when using my own images for annotations, notMKPinAnnotationView
. When I tried usingMKPinAnnotationView
, my images were no longer centered.If worst comes to worst, you can play with the
centerOffset
property. I don't think you should need to if you useMKAnnotationView
.
Regarding your shadow:
A shadow radius of 20 is so great, that it's so diffuse that you can barely see it. I could barely make it out when I used 20. It was starting to become more visible at 10, and even more so at 5. I don't think this is the real problem here, but as you start to experiment, use a number low enough here so you can clearly see the shadow.
Having said that, I don't think that's the problem. I'm suspicious of the image rounding algorithm. Can you try temporarily commenting that out and see if your shadow appears? But I use shadows on my
MKAnnotationView
images, and it works fine. Can you share your rounding algorithm with us?And if that doesn't do it, is this image coinciding with an overlay? (i.e. what's that circle behind the picture). I'd try, again, temporarily removing it and see if that changes the behavior. When I use a
MKCircleView
, it works fine, but let's make sure we're not doing anything curious there (or with any other drawing routines).