public override MKOverlayView GetViewForOverlay(MKMapView mapView, NSObject overlay)
            {
                MKOverlayView overlayView = null;

                if (overlay is MKPolygon)
                {
                    MKPolygon polygon     = overlay as MKPolygon;
                    var       polygonView = new MKPolygonView(polygon);
                    polygonView.FillColor = UIColor.Purple;
                    polygonView.Alpha     = 0.7f;
                    overlayView           = polygonView;
                }
                else if (overlay is MKCircle)
                {
                    MKCircle circle     = overlay as MKCircle;
                    var      circleView = new MKCircleView(circle);
                    circleView.FillColor = UIColor.Green;
                    overlayView          = circleView;
                }
                else if (overlay is MKPolyline)
                {
                    MKPolyline polyline     = overlay as MKPolyline;
                    var        polylineView = new MKPolylineView(polyline);
                    polylineView.StrokeColor = UIColor.Black;
                    overlayView = polylineView;
                }
                else if (overlay is CustomOverlay)
                {
                    CustomOverlay co = overlay as CustomOverlay;
                    var           v  = new CustomOverlayView(co);
                    overlayView = v;
                }

                return(overlayView);
            }
 public override MKOverlayView GetViewForOverlay (MKMapView mapView, NSObject overlay)
 {
     MKOverlayView overlayView = null;
     
     if(overlay is MKPolygon){
         MKPolygon polygon = overlay as MKPolygon;
         var polygonView = new MKPolygonView(polygon);
         polygonView.FillColor = UIColor.Purple;
         polygonView.Alpha = 0.7f;
         overlayView = polygonView;
     }
     else if(overlay is MKCircle){
         MKCircle circle = overlay as MKCircle;
         var circleView = new MKCircleView (circle);
         circleView.FillColor = UIColor.Green;
         overlayView = circleView;
     }
     else if(overlay is MKPolyline){
         MKPolyline polyline = overlay as MKPolyline;
         var polylineView = new MKPolylineView (polyline);
         polylineView.StrokeColor = UIColor.Black;
         overlayView = polylineView;
     }   
     else if(overlay is CustomOverlay)
     {
         CustomOverlay co = overlay as CustomOverlay;
         var v = new CustomOverlayView(co);
         overlayView = v;
     }
     
     return overlayView;
 }