Search code examples
iosgoogle-mapsmapsmarkersgmsmapview

How can I center the GMSMapMarker view in a coordinate


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.


Solution

  • I found the solution using the property groundAnchor of GMSMarker:

    _mapMarker.groundAnchor = CGPointMake(0.5,0.5);