How to get coordinate center of gmsmapview in iphone

imalice picture imalice · Feb 27, 2013 · Viewed 24.7k times · Source

I'm using the new Google Maps SDK for iOS

Can I get the true coordinate form GMSMapView.center? Now it returns a value of CGPoint, but it's not the true coordinate.

Thank and Regards.

Answer

Jing picture Jing · Mar 4, 2013

Use the projection method - (CLLocationCoordinate2D)coordinateForPoint:(CGPoint)pointof the mapview to convert a point in the map to the geological coordinates

CGPoint point = mapView.center;
CLLocationCoordinate2D coor = [mapView.projection coordinateForPoint:point];