
Untitled
By: a guest on
Aug 5th, 2012 | syntax:
None | size: 0.58 KB | hits: 13 | expires: Never
Showing region around current location in MKMapKit View
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
costaCoffeeMapView.delegate = self;
MKCoordinateRegion region;
MKCoordinateSpan span;
span.latitudeDelta=0.2;
span.longitudeDelta=0.2;
CLLocationCoordinate2D location = costaCoffeeMapView.userLocation.coordinate;
region.center=location;
region.span=span;
[costaCoffeeMapView setRegion:region animated:YES];
[costaCoffeeMapView regionThatFits:region];
}