tags:

views:

27

answers:

1

Hi guys.

I am trying zoom MKMapView by giving location. Also it would be looking around X meters from the location.

How to make it ?

I tried following code :

MKCoordinateRegion region;
region.center.latitude     = longitude;
region.center.longitude    = latitude;
region.span.latitudeDelta  = 0.1;
region.span.longitudeDelta = 0.1;
[mapView setRegion:region];

But no luck.

Thanks in advance.

+1  A: 

You might be interested in this article: Set the Zoom Level of an MKMapView

Full explanation: MKMapView and Zoom Levels: A Visual Guide

QAD