MapKit: MKPolylineRenderer shows artifacts when visible map rect is changed

Originator:robotspacer
Number:rdar://28511018 Date Originated:28-Sep-2016 01:40 AM
Status:Open Resolved:
Product:macOS SDK Product Version:macOS 10.12 (16A323) and macOS 10.12 beta 2 (16B2333a)
Classification:Serious Bug Reproducible:Always
 
Summary:
Starting with macOS 10.12 and iOS 10, I've run into a problem with MKPolylineRenderer where there are artifacts visible after changing the visible map rect.

If the map starts out showing a large area, the thickness of the polyline covers more physical distance. Once the map is zoomed in, it covers a smaller area. That's expected. However, it fails to clear out the entire original area—so part of the original rendering remains, in a blurry, pixelated mess.

You can see a screenshot of this problem in the attachment, as well as a simple demo app that recreates the issue.

Steps to Reproduce:
1. Run the attached sample app, MessyMap.
2. Click the "Show Overlay" button. This creates an MKGeodesicPolyline, adds it as an overlay that is rendered by MKPolylineRenderer, and then changes the visible map rect. (This code is all in AppDelegate.m)

Expected Results:
A single blue line should appear on top of the map.

Actual Results:
Next to the blue line are some artifacts—blurry, pixelated sections of the original rendering when the map was zoomed out.

Version:
macOS 10.12 (16A323) and Xcode 8.0 (8A218a).
I have also recreated the problem on macOS 10.12 beta 2 (16B2333a) using an early 2015 MacBook Pro.

Notes:


Configuration:
iMac 4GHz i7, 32GB RAM, 1TB SSD, M295X

Attachments:
'MessyMap.zip' was successfully uploaded.

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!