0

In my app, I'm using MKMapView I want to zoom as per my picture I tried MKMakeCoordinate with various values randomly but didn't received the exact result. Please help to issue this issue.

Bhavin Ramani
  • 3,221
  • 5
  • 30
  • 41

1 Answers1

1

// delta is the zoom factor // 2 will zoom out x2 // .5 will zoom in by x2

-(void)zoomMap:(MKMapView*)mapView byDelta:(float) delta 
{

    MKCoordinateRegion region = mapView.region;
    MKCoordinateSpan span = mapView.region.span;
    span.latitudeDelta*=delta;
    span.longitudeDelta*=delta;
    region.span=span;
    [mapView setRegion:region animated:YES];

}
amit soni
  • 2,183
  • 1
  • 14
  • 17