Instance Method

mapView:viewForOverlay:

Asks the delegate for the overlay view to use when displaying the specified overlay object.

Declaration

- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay;

Parameters

mapView

The map view that requested the overlay view.

overlay

The object representing the overlay that is about to be displayed.

Return Value

The view to use when presenting the specified overlay on the map. If you return nil, no view is displayed for the specified overlay object.

Discussion

Prior to iOS 7, you would implement this method to provide the views for your overlay objects.

See Also

Managing the Display of Overlays

- mapView:rendererForOverlay:

Asks the delegate for a renderer object to use when drawing the specified overlay.

- mapView:didAddOverlayRenderers:

Tells the delegate that one or more renderer objects were added to the map.

- mapView:didAddOverlayViews:

Tells the delegate that one or more overlay views were added to the map.

Deprecated