MKMapRectContainsRect and MKMapRectUnion issues with antiMeridian spanning rects
| Originator: | sknodl | ||
| Number: | rdar://33699497 | Date Originated: | August 3, 2017 |
| Status: | open | Resolved: | |
| Product: | iOS | Product Version: | 8.3 |
| Classification: | Bug | Reproducible: | Yes |
Area: MapKit Summary: Two related issues: MKMapContainsRect incorrectly returns false when the containing rect spans the 180th meridian and the contained rect lies completely within the eastern hemisphere and the containing rect. This scenario works correctly for a similar rect in the western hemisphere. MKMapRectUnion generates an incorrect rect when joining a rect spanning the 180th meridian and a rect fully contained by the eastern hemisphere. Steps to Reproduce: MKMapRectContains issue - Create a rect MKMapRect spanning the 180th meridian. (spanningRect) - Create a rect within the spanningRect but also only within the eastern hemisphere. (containedRect) - Execute a let contains = MKMapRectContains(spanningRect, containedRect) MKMapRectUnion issue - Execute a let union = MKMapUnion(spanningRect, containedRect) Expected Results: MKMapRectContains issue - Result should be true MKMapUnion issue - Result should be spanningRect Observed Results: MKMapRectContains issue - Result will be false MKMapUnion issue - Result will be rect with correct latitude bounds, but longitude that completely spans around the globe Version: Observed on Xcode 8.3 playground/app and Xcode 9b4 playground.
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!