Instance Method

exchangeOverlay:withOverlay:

Exchanges the positions of the two overlay objects.

Declaration

- (void)exchangeOverlay:(id<MKOverlay>)overlay1 withOverlay:(id<MKOverlay>)overlay2;

Parameters

overlay1

The first overlay object.

overlay2

The second overlay object.

Discussion

If the overlays are in the same map level, they exchange positions within that level’s array of overlay objects. If they are in different map levels, the two objects also swap levels. Swapping the position of the overlays affects their visibility in the map view.

See Also

Adding and Inserting Overlays

addOverlay:level:

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

addOverlays:level:

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

addOverlay:

Adds a single overlay object to the map.

addOverlays:

Adds an array of overlay objects to the map.

insertOverlay:atIndex:level:

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

insertOverlay:atIndex:

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

insertOverlay:aboveOverlay:

Inserts one overlay object on top of another.

insertOverlay:belowOverlay:

Inserts one overlay object below another.

exchangeOverlayAtIndex:withOverlayAtIndex:

Exchanges the position of two overlay objects.