I am using MKMapkit for map-section in my app. I have to display a pin image as MKAnnotation. When I add the annotation in map view, the center of the image, points to the latitude and longitude. But I want that the bottom-left corner of the image should point to the specified latitude and longitude. I am following the link MapCallouts for displaying the annotation. Is there any way to achieve the target. Then please help.
You need to set appropriate value to centerOffset property of annotation view:
centerOffset
By default, the center point of an annotation view is placed at the coordinate point of the associated annotation. You can use this property to reposition the annotation view as needed. This x and y offset values are measured in pixels. Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With