Voloda2
Voloda2

Reputation: 12607

Why does MKMapView show incorrect radius

enter code hereMKCoordinateRegion viewRegion;
viewRegion = MKCoordinateRegionMakeWithDistance(CLLocationCoordinate2DMake(51.4998844,-0.1261814), 10*1000, 10*1000);   
[mapView setRegion:viewRegion animated:YES];

MapLocation *annotation;
annotation = [[MapLocation alloc] init];
annotation.coordinate =CLLocationCoordinate2DMake(51.4998844, -0.1261814);
annotation.placeTitle = [NSString stringWithString:@"London"];
[mapView addAnnotation:annotation];
[annotation release];`enter code here`

I set London coordinate with 10 km radius. Then I compare my iphone map with http://www.freemaptools.com/radius-around-point.htm. I found that freemaptools shows many more locations then iPhone map. For example, I didn't see "White Stadt" on the iPhone but I see it on freemaptools. But, why? Please , see my pictures.

enter image description hereenter image description here

Update: I added span = 2*10 but it's not helps me. We see much more areas. Please see on the river. enter image description here

Upvotes: 3

Views: 578

Answers (1)

InsertWittyName
InsertWittyName

Reputation: 3940

From the documentation: http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MapKitFunctionsReference/Reference/reference.html

latitudinalMeters The amount of north-to-south distance (measured in meters) to use for the span.

longitudinalMeters The amount of east-to-west distance (measured in meters) to use for the span.

Which is more like a diameter than a radius.

Try setting the two parameters to 2*10*1000 each.

Upvotes: 1

Related Questions