How can I center the GMSMapMarker view in a coordinate

406 views Asked by At

enter image description here

Is there a way to center the orange arrow (a GMSMapMarker) in a coordinate, changing the view frame or something? I'm using Google Maps for iOS. I can rotate the view with an angle, but I want to set the view's center in a custom coordinate.

2

There are 2 answers

0
Jimmy On BEST ANSWER

I found the solution using the property groundAnchor of GMSMarker:

_mapMarker.groundAnchor = CGPointMake(0.5,0.5);

0
kaho On

I think you can calculate the pixel/degree by using the GMSCoordinateBounds, then you can shift the center bases on your icon size and heading.