MonoTouch.Dialog.MapViewDelegate.GetViewForAnnotation C# (CSharp) Method

GetViewForAnnotation() public method

public GetViewForAnnotation ( MKMapView mapView, NSObject annotation ) : MKAnnotationView
mapView MKMapView
annotation NSObject
return MKAnnotationView
        public override MKAnnotationView GetViewForAnnotation (MKMapView mapView, NSObject annotation)
        {
            var anv = mapView.DequeueReusableAnnotation("thislocation");
            if (anv == null)
            {
                var pinanv = new MKPinAnnotationView(annotation, "thislocation");
                pinanv.AnimatesDrop = true;
                pinanv.PinColor = MKPinAnnotationColor.Green;
                pinanv.CanShowCallout = false;
                anv = pinanv;
            }
            else
            {
                anv.Annotation = annotation;
            }
            return anv;
        }
    }
MapViewDelegate