Posted By

sag333ar on 03/03/11


Tagged

xcode Objective-c iphone MKMapView ios CLLocationCoordinate2D MKCoordinateRegion MKCoordinateSpan


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

sag333ar
Tintenklecks


MKMapView Zoom to specific co-ordinate & region


 / Published in: Objective C
 

  1. CLLocationCoordinate2D myx;
  2. myx.longitude=47.963580;
  3. myx.latitude=29.362336;
  4.  
  5. MKCoordinateRegion region;
  6. MKCoordinateSpan span;
  7. span.latitudeDelta = 1.0;
  8. span.longitudeDelta = 1.0;
  9. region.span = span;
  10. region.center = myx;
  11.  
  12. [mapView setRegion:region animated:YES];
  13. [mapView regionThatFits:region];

Report this snippet  

You need to login to post a comment.