Instance Method


Adds a single overlay object to the map.


- (void)addOverlay:(id<MKOverlay>)overlay;



The overlay object to add. This object must conform to the MKOverlay protocol.


The specified object is added to the group of overlay objects in the MKOverlayLevelAboveLabels level. Adding an overlay causes the map view to begin monitoring the area represented by that overlay. As soon as the bounding rectangle of an overlay intersects the visible portion of the map, the map view adds a corresponding overlay view to the map. The overlay view is provided by the mapView:viewForOverlay: method of the map view’s delegate object.

To remove an overlay from a map, use the removeOverlay: method.

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.

- 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.

- exchangeOverlay:withOverlay:

Exchanges the positions of the two overlay objects.

- exchangeOverlayAtIndex:withOverlayAtIndex:

Exchanges the position of two overlay objects.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software