Contents

mapView(_:viewFor:)

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

Declaration

optional func mapView(_ mapView: MKMapView, viewFor overlay: any MKOverlay) -> MKOverlayView

Parameters

  • mapView:

    The map view that requests the overlay view.

  • overlay:

    The object representing the overlay that the map view is about to display.

Return Value

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

See Also

Methods