enter code hereMKCoordinateRegion viewRegion;
viewRegion = M开发者_运维技巧KCoordinateRegionMakeWithDistance(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.
Update: I added span = 2*10 but it's not helps me. We see much more areas. Please see on the river.
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.
精彩评论