How to get left-top and right-buttom latitude and longitude of map in MapKit For iPad ?
Posted
by damniatx
on Stack Overflow
See other posts from Stack Overflow
or by damniatx
Published on 2010-06-06T21:47:24Z
Indexed on
2010/06/06
21:52 UTC
Read the original article
Hit count: 142
Hi, i'm looking for answer about getting latitude and longitude from uimapkit. there is same problem that has been answered, but it didn't give right coordinate. http://yit.me/3ddp73
it's code from thread i'm linking above.
CLLocationCoordinate2D topLeft, bottomRight;
topLeft = [mapView convertPoint:CGPointMake(0,0) toCoordinateFromView:mapView];
CGPoint pointBottomRight = CGPointMake(mapView.frame.size.width, mapView.frame.size.height);
bottomRight = [mapView convertPoint:pointBottomRight toCoordinateFromView:mapView];
NSLog(@"topleft = %f", topLeft);
NSLog(@"bottom right = %f", bottomRight);
any idea to fix this issue ?
thanks
© Stack Overflow or respective owner