正如我所看到的,您已经有了地图的区域。它不仅包含经纬度三角洲,还包含该区域的中心点。您可以计算以米为单位的距离,如图所示:
1:获取区域跨度(区域有多大,以纬度/经度为单位)
MKCoordinateSpan span = region.span;
2:获取区域中心(纬度/经度坐标)
CLLocationCoordinate2D center = region.center;
3:根据中心位置创建两个位置(loc1 & loc2,北 - 南)并计算其间的距离(以米为单位)
//get latitude in meters
CLLocation *loc1 = [[CLLocation alloc] initWithLatitude:(center.latitude - span.latitudeDelta * 0.5) longitude:center.longitude];
CLLocation *loc2 = [[CLLocation alloc] initWithLatitude:(center.latitude + span.latitudeDelta * 0.5) longitude:center.longitude];
int metersLatitude = [loc1 distanceFromLocation:loc2];
4:根据中心位置创建两个位置(loc3 & loc4, west - east)并计算其间的距离(以米为单位)
//get longitude in meters
CLLocation *loc3 = [[CLLocation alloc] initWithLatitude:center.latitude longitude:(center.longitude - span.longitudeDelta * 0.5)];
CLLocation *loc4 = [[CLLocation alloc] initWithLatitude:center.latitude longitude:(center.longitude + span.longitudeDelta * 0.5)];
int metersLongitude = [loc3 distanceFromLocation:loc4];