MKAnnotationViews are rendered as invisible / hidden

Originator:worthbak
Number:rdar://36827527 Date Originated:1/24/2018
Status:Open Resolved:No
Product:iOS / MapKit Product Version:11.2.5
Classification: Reproducible:100%
 
Area:
MapKit

Summary:
When adding many (>~1k) annotations to an MKMapView, zooming in and then zooming out, some of the annotation views will consistently render as invisible (annotationView.layer.isHidden == true). The issue is fixed by manually changing the annotation view's layer.isHidden to `false`. 

Steps to Reproduce:
(See sample project) - Add many annotations to a map view (sample project adds 10k). Zoom in such that only ~10 views are visible. Possibly adjust the pitch of the map (place two fingers on the map and drag up). Zoom out such that ~100 are visible. Pan/zoom around and note that some of the annotations have disappeared (easy to view in the sample project, as items in the annotation grid will be obviously missing). 

You can also check out the view debugger to see that the annotations have a frame-space in the view, but are invisible. 

Expected Results:
That annotations are rendered accurately and consistently, and are never made to be hidden unexpectedly. 

Actual Results:
Annotation views are made to be hidden unexpectedly and seemingly randomly. 

Version/Build:
iOS 11.2.5 (15D60)

Configuration:
Reproduced on iPhone 8 Plus and other devices

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!