MKMapViewDelegate.OverlayRenderer(MKMapView, IMKOverlay) MKMapViewDelegate.OverlayRenderer(MKMapView, IMKOverlay) Method


Calculates he MKOverlayRenderer appropriate to the overlay.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual MapKit.MKOverlayRenderer OverlayRenderer (MapKit.MKMapView mapView, MapKit.IMKOverlay overlay);
abstract member OverlayRenderer : MapKit.MKMapView * MapKit.IMKOverlay -> MapKit.MKOverlayRenderer
override this.OverlayRenderer : MapKit.MKMapView * MapKit.IMKOverlay -> MapKit.MKOverlayRenderer


MKMapView MKMapView

The MKMapView being rendered.

IMKOverlay IMKOverlay

The overlay requiring a renderer.



iOS distinguishes between the MKOverlay, which represents the geometry of an overlay, and it's visual presentation. Prior to iOS 7, overlays were rendered using MKOverlayViews. In iOS 7, these classes have been deprecated, and overlays now use the more efficient subclasses of MKOverlayRenderer.

To create an overlay and its renderer, application developers must add the overlay to the MKMapView and return the renderer either using the OverlayRenderer property or by overriding the OverlayRenderer(MKMapView, IMKOverlay) method.

This method dynamically calculates the renderer, allowing the application developer to reuse renderers with identical properties or to change properties dynamically.

Applies to

See also