MapKit - render a line above everything, including annotations

I have a map application that needs to show a line (representing a direct route) that is above everything, including annotations. This is important because the map has lots of annotations (possibly hundreds) and the line is representing a route from point to another. With that many annotations being on top the line / route is basically useless because you can't see it.

I've looked at things like MKOverlayLevel but it only supports .aboveRoads or .aboveLabels. Is there a way to set the z-axis of a map overlay so that it truly is on top of everything else on the map, including annotations? And if not directly in MapKit, what other options might I have?

Worth noting that I'm targeting 16.4 and above, so that's my limitation on this

Answered by DTS Engineer in 817348022

The MapKit overlay API supports z-ordering within the groupings expressed by the above roads and above labels APIs. An annotation is not an overlay, so it does not participate in the ordering as you're looking for, so if you'd like to see an alternative method of managing the visual display of overlays and annotations, please open an enhancement request that demonstrates your needs.

Note that you can also group your annotations through the annotation clustering API to help declutter the map, if that would help improve how your app is displaying its data.

—Ed Ford,  DTS Engineer

The MapKit overlay API supports z-ordering within the groupings expressed by the above roads and above labels APIs. An annotation is not an overlay, so it does not participate in the ordering as you're looking for, so if you'd like to see an alternative method of managing the visual display of overlays and annotations, please open an enhancement request that demonstrates your needs.

Note that you can also group your annotations through the annotation clustering API to help declutter the map, if that would help improve how your app is displaying its data.

—Ed Ford,  DTS Engineer

MapKit - render a line above everything, including annotations
 
 
Q