Beispiel #1
0
 public MyAnnotation(CLLocationCoordinate2D l, string t, string s, MKPinAnnotationColor c)
 {
     coordinate = l;
     title      = t;
     subtitle   = s;
     color      = c;
     active     = false;
 }
        private MKAnnotationView getAvaiableAnnotationView(string annotationId, MKPinAnnotationColor penColor, NSObject annotation)
        {
            var annotationView = mapView.DequeueReusableAnnotation(annotationId) as MKPinAnnotationView;
            if (annotationView == null)
                annotationView = new MKPinAnnotationView(annotation, annotationId);

            annotationView.PinColor = penColor;
            annotationView.CanShowCallout = true;
            annotationView.Draggable = true;

            return annotationView;
        }
        private MKAnnotationView getAvaiableAnnotationView(string annotationId, MKPinAnnotationColor penColor, NSObject annotation)
        {
            var annotationView = mapView.DequeueReusableAnnotation(annotationId) as MKPinAnnotationView;

            if (annotationView == null)
            {
                annotationView = new MKPinAnnotationView(annotation, annotationId);
            }

            annotationView.PinColor       = penColor;
            annotationView.CanShowCallout = true;
            annotationView.Draggable      = true;

            return(annotationView);
        }
Beispiel #4
0
        /// <summary>
        /// The custom constructor is required to pass the values to this class,
        /// because in the MKAnnotation base the properties are read-only
        /// </summary>
        public MyAnnotation(CLLocationCoordinate2D l, string t, string s, MKPinAnnotationColor c, object h)
        {
            coordinate = l;
            title      = t;
            subtitle   = s;
            color      = c;

            btn    = UIButton.FromType(UIButtonType.DetailDisclosure);
            active = true;
            try {
                btn.TouchUpInside += delegate {
                    //goHotel ();
                };
            } catch {
                active = false;
            }
        }
Beispiel #5
0
 /// <summary>
 /// The custom constructor is required to pass the values to this class,
 /// because in the MKAnnotation base the properties are read-only
 /// </summary>
 public UnityAnnotation(CLLocationCoordinate2D locCoord, string title, string subtitle, MKPinAnnotationColor anotationColor)
 {
     coordinate = locCoord;
     this.title = title;
     this.subtitle = subtitle;
     color = anotationColor;
 }