Instance Method

insert(_:at:)

Inserts an overlay object into the list associated with the map.

Declaration

func insert(_ overlay: MKOverlay, at index: Int)

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.

Discussion

This method inserts the overlay into the aboveLabels level.

See Also

Adding and Inserting Overlays

func add(MKOverlay, level: MKOverlayLevel)

Adds the overlay object to the map at the specified level.

func addOverlays([MKOverlay], level: MKOverlayLevel)

Adds an array of overlay objects to the map at the specified level.

func add(MKOverlay)

Adds a single overlay object to the map.

func addOverlays([MKOverlay])

Adds an array of overlay objects to the map.

func insert(MKOverlay, at: Int, level: MKOverlayLevel)

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

func insert(MKOverlay, above: MKOverlay)

Inserts one overlay object on top of another.

func insert(MKOverlay, below: MKOverlay)

Inserts one overlay object below another.

func exchangeOverlay(MKOverlay, with: MKOverlay)

Exchanges the positions of the two overlay objects.

func exchangeOverlay(at: Int, withOverlayAt: Int)

Exchanges the position of two overlay objects.