Instance Method

overlays(in:)

The overlay objects in the specified level of the map.

Declaration

func overlays(in level: MKOverlayLevel) -> [MKOverlay]

Parameters

level

The map level whose overlays you want. For a list of possible values for this parameter, see MKOverlayLevel.

Return Value

An array of objects conforming to the MKOverlay protocol that display in the specified map level. If there are no overlays at the specified level, this method returns an empty array.

Discussion

You can use this method to get all of the overlays assigned to a specific map level, which might be a subset of the complete set of overlay objects. For overlapping overlay objects, the order of objects in the array represents their visual order when displayed on the map, with objects in the beginning of the array located behind those at later indexes.

See Also

Accessing Overlays

var overlays: [MKOverlay]

The overlay objects currently associated with the map view.

func renderer(for: MKOverlay)

Returns the renderer object used to draw the contents of the specified overlay object.