Question

How can I move the pin image so that the bottom of the image points to the location (like the default pin). Currently the center of the image points to that location (San Francisco).

enter image description here

Was it helpful?

Solution

You'll need to calculate the number of pixels to offset and then set the centerOffset property.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top