Add a flag to enforce visibility of MKMarkerAnnotationViews

Originator:futuretap
Number:rdar://46205149 Date Originated:22-Nov-2018 12:47 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:12.1
Classification:Enhancement Reproducible:Not Applicable
 
Summary:
Marker annotation views are great because the convey more information (title, subtitle) compared to traditional annotation views. However, this comes at the cost that they're sometimes hidden altogether. 

We'd like to see an `alwaysShowMarker` Bool property (or a `markerVisibility` property of type MKFeatureVisibility) that forces the marker view to be always visible. Only the titles and subtitles would be hidden if space is tight.

Steps to Reproduce:
 

Expected Results:
 

Actual Results:
 

Version:
12.1

Notes:
The existing titleVisibility and subtitleVisibility properties don't help because they prevent the bubble itself from being hidden.

Comments

My response

This doesn't work unfortunately. Even when specifying

view.displayPriority = .required 
view.titleVisibility = .adaptive

some markers aren't displayed, depending on the zoom level. Please find a sample app attached, reproducing the issue. Just hit the "Zoom In" and "Zoom Out" buttons alternatively and different markers are shown. (Tested on an iPhone XR simulator. For other devices, the zoom levels might need adjustment.)

Apple response

This issue behaves as intended based on the following:

What’s described here is exactly what I’d expect to happen if you use an MKMarkerAnnotationView, set its displayPriority to .required, and set its titleVisibilty/subtitleVisibility to .adaptive.

MKMarkerAnnotationView has a default displayPriority of < .required, so maybe that’s the disconnect — you need to set the displayPriority.

Please update your bug report to let us know if this is still an issue for you.


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!