Display Priority of Annotation Views is rendering different annotations views when I swipe (keeping the zoom level)

Originator:barbararodeker
Number:rdar://34131273 Date Originated:August 29 2017, 2:43 PM
Status:open Resolved:
Product:iOS SDK MapKit Product Version:
Classification: Reproducible:Always
 
Area:
MapKit

Summary:
Plus the zPosition of the layer of the AnnotationView is not respected anymore to render the annotations.

-------------------------
Good morning,

    I'd like to report an issue we are experiencing in our application. The rendering order of the annotation views was managed previously based on the zPosition of the layers associated.

Since iOS 11 (last tested today in Beta 8) we see that the zPosition seems to be re-calculated by the MKMapView when the annotations are rendered. Therefore the priorities that we need to set (to show some highlighted annotations on the top of others which are not so relevant), is broken.

We decided to manage the priorities with the new available displayPriority variable (despite this is not exactly what we need, because we do not need annotations to be hidden, we just need to set an order). We implemented a hierarchy of priorities, given more priority to the annotations that need to be on the top and less to the other annotations. 

Unfortunately this is not working, and when there is a swipe gesture on the map, even if the zoom scale does not change the annotations that are displayed change constantly, flickering the map, disappearing and sometimes appearing, which results in a very bad user experience. 

I was able to reproduce the issue in a clean project.  In the project a number of annotations are generated the first time the region changes and then, you can inspect the issues swiping the map view without changing the zoom level.

There are some attachments from the issue in the real device and a video from the simulator. 

The collision mode have been set to .circle  and the alignmentRectInsets have been overwritten depending on the size of the contained images inside the annotation views.

Steps to Reproduce:
- Add a MKMapView
- Add annotations to the view with different display priorities.
- Do not remove or add more annotations
- Without changing the zoom level, swipe the map

Expected Results:
The display priority should be respected and after swiping, since the zoom level does not change, the same annotations views that were visible should remain visible.

Observed Results:
When the map view is swiped the annotation views that are displayed are continuously changing, some of the views that were visible become hidden and viceversa.

Version:
iOS 11 Beta 8

Notes:


Configuration:
iOS 11 Beta 8
XCode Version 9.0 beta 6 (9M214v)

Comments

Apple Developer Relations

Apple Developer Relations October 19 2017, 7:45 AM Engineering has determined that your bug report is a duplicate of another issue and will be closed. The open or closed status of the original report your bug was duplicated to appears in a text box within the bug detail section of the bug reporter user interface. For security and privacy reasons, we don't provide access to the original bug yours was duped to. If you have any questions or concerns, please update your report directly at this link: https://bugreport.apple.com/.

By barbararodeker at Oct. 26, 2017, 1:08 p.m. (reply...)

Apple Developer Relations

September 11 2017, 4:35 PM Thanks, we are working on the new information you provided. We appreciate your help!

By barbararodeker at Sept. 21, 2017, 10:07 a.m. (reply...)

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!