Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get coordinate center of gmsmapview in iphone

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.

like image 601
imalice Avatar asked Feb 27 '13 02:02

imalice


1 Answers

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]; 
like image 150
Jing Avatar answered Sep 21 '22 20:09

Jing