Instance Method


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


optional func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer



The map view that requested the renderer object.


The overlay object that is about to be displayed.

Return Value

The renderer to use when presenting the specified overlay on the map.


You must implement this method and use it to provide an appropriate renderer object for your overlays. The renderer object is responsible for drawing the contents of your overlay when asked to do so by the map view. Map Kit supports many different types of standard renderer objects and you may also define your own custom renderers.

See Also

Managing the Display of Overlays

func mapView(MKMapView, didAdd: [MKOverlayRenderer])

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

func mapView(MKMapView, viewFor: MKOverlay) -> MKOverlayView

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

func mapView(MKMapView, didAddOverlayViews: [Any])

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