Cannot override GetRendererForOverlay on monotouch

I want to draw an overlay on top of mine. MKMapViewSo, I defined this class delegateto determine the type of overlays. but, as you can see, it seems that from iOS 7 it is recommended to use GetRendererForOverlayinstead GetViewForOverlay. The problem is that I cannot find any method by name GetRendererForOverlayto override. At best, it MKMapViewDelegatedoesn't seem to have a virtual method to override GetRendererForOverlay. So how should we use it?

public class myMapDelegat : MKMapViewDelegate {


    [Obsolete ("Since iOS 7 it is recommnended that you use GetRendererForOverlay")]
    public override MKOverlayView GetViewForOverlay (MKMapView mapView, NSObject overlay)
    {
        // NOTE: Don't call the base implementation on a Model class
        // see http://docs.xamarin.com/guides/ios/application_fundamentals/delegates,_protocols,_and_events
        throw new NotImplementedException ();
    }

}

I read the document that was suggested in NOTE, but I did not find anything about GetRendererForOverlay.

+4
1

GetViewForOverlay iOS7.

var circleOverlay = MKCircle.Circle (mapView.CenterCoordinate, 1000);
mapView.AddOverlay (circleOverlay);

, .

0

Source: https://habr.com/ru/post/1530940/


All Articles