Custom Pin/Annotation Icon is centered on Position, how to make it on top??

Alexander Blohmé 1 Reputation point

I have a problem when adding a custom needle pin image, it will be placed in the CENTER of the Position coordinate, not the top so if I zoom out the bottom of the tip of the needle will go way off the real location of the pin, any idea on how to make it like the native pins?

       annotationView = new CustomMKAnnotationView(annotation, customPin.Name);      
                annotationView.Image = UIImage.FromFile(customPin.image);      

            annotationView.CalloutOffset = new CGPoint(0, 0);      
            annotationView.LeftCalloutAccessoryView = new UIImageView(UIImage.FromFile(customPin.image));      
            annotationView.RightCalloutAccessoryView = UIButton.FromType(UIButtonType.DetailDisclosure);      
            ((CustomMKAnnotationView)annotationView).Name = customPin.Name;      
            //((CustomMKAnnotationView)annotationView).Url = customPin.Url;      


A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,325 questions
{count} votes