MKCoordinateRegionMakeWithDistance() returns nonsense at the poles
| Originator: | tangphillip | ||
| Number: | rdar://17308103 | Date Originated: | 13-Jun-2014 05:33 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 7.1.1 (11D201) |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
MKCoordinateRegionMakeWithDistance, when passed a coordinate of the south pole (-90, 0), gives a nonsense region.
Steps to Reproduce:
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(-90.0, 0.0);
CLLocationDistance span = 40000.0;
MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(coordinate, region, region);
NSLog
[self.mapView setRegion:region animated:NO];
...crash.
Inspecting in LLDB:
(lldb) p (MKCoordinateRegion)MKCoordinateRegionMakeWithDistance((CLLocationCoordinate2D)CLLocationCoordinate2DMake(-90.0, 0.0), 40000.0, 40000.0)
(MKCoordinateRegion) $5 = {
center = (latitude = -90, longitude = 0)
span = (latitudeDelta = 0.35812156084170216, longitudeDelta = 5848568262642516)
}
Expected Results:
LongitudeDelta should be zero...or at least not 5848568262642516.
Actual Results:
longitudeDelta = 5848568262642516
...wat
Version:
iOS 7.1 simulator, iOS 7.1.1 (11D201)
Notes:
Configuration:
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Please know that our engineering team has determined that this issue behaves as intended based on the information provided.
As +/-90 latitude cannot be represented on the mercator projection retsult that we getting from MKCoordinateRegionMakeWithDistance is expcted.