1

I am beginner to iPhone application. I am going to develop the app using google map. When user drag in map screen and change the content of map screen, I want to get the coordinate of northeast and southwest in current map screen. After user zoom out/zoom in, user can change the content of map screen. In this case, I must get the coordinate of northeast and southwest. I didn't find the method for this.

John Conde
  • 217,595
  • 99
  • 455
  • 496
Bai
  • 135
  • 1
  • 2
  • 8

1 Answers1

4

You can do like this (See that question) :

MKMapRect mapRect = self.mapView.visibleMapRect;

MKMapPoint cornerPointNE = MKMapPointMake(mapRect.origin.x + mapRect.size.width, mapRect.origin.y);
CLLocationCoordinate2D cornerCoordinateNE = MKCoordinateForMapPoint(cornerPointNE);

MKMapPoint cornerPointSW = MKMapPointMake(mapRect.origin.x, mapRect.origin.y + mapRect.size.height);
CLLocationCoordinate2D cornerCoordinateSW = MKCoordinateForMapPoint(cornerPointSW);
Community
  • 1
  • 1
Oliver
  • 23,072
  • 33
  • 138
  • 230