Contents

insertOverlay(_:at:level:)

Inserts an overlay object into the level at the specified index.

Declaration

func insertOverlay(_ overlay: any MKOverlay, at index: Int, level: MKOverlayLevel)

Parameters

  • overlay:

    The overlay object to insert.

  • index:

    The index at which to insert the overlay object. If this value is greater than the number of objects in the Overlays property, this method appends the object to the end of the array.

  • level:

    The map level at which to place the overlay. For a list of possible values for this parameter, see Mkoverlaylevel.

Discussion

Inserting an overlay at a specific level places that overlay’s visual representation in front of or behind other map content such as map labels and point-of-interest icons.

See Also

Adding and inserting overlays