MKMapViewDelegate.OverlayRenderer(MKMapView, IMKOverlay) Method

Definition

Calculates he MKOverlayRenderer appropriate to the overlay.

[Foundation.Export("mapView:rendererForOverlay:")]
[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

Parameters

mapView
MKMapView

The MKMapView being rendered.

overlay
IMKOverlay

The overlay requiring a renderer.

Returns

Attributes

Remarks

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