开发者

Why does MKMapView show incorrect radius

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.

Why does MKMapView show incorrect radius

Why does MKMapView show incorrect radius

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

Why does MKMapView show incorrect radius


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜