Instance Method

exchangeOverlay(at:withOverlayAt:)

Exchanges the position of two overlay objects.

Declaration

func exchangeOverlay(at index1: Int, withOverlayAt index2: Int)

Parameters

index1

The index of an overlay in the aboveLabels map level.

index2

The index of another overlay in the aboveLabels map level.

Discussion

If you need to exchange overlays in other map levels, use the exchangeOverlay(_:with:) method.

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, at: Int)

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

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.