public override void AddUser() { _userAnnotation = new UserAnnotation(new CLLocationCoordinate2D { Latitude = Settings.UserLatitude, Longitude = Settings.UserLongitude }); _nativeMap.AddAnnotation(_userAnnotation); }
private MKAnnotationView GetViewForUserAnnotation(UserAnnotation annotation) { var annotationView = _nativeMap.DequeueReusableAnnotation(UserAnnotationView.CustomReuseIdentifier); if (annotationView == null) { annotationView = new UserAnnotationView(annotation); } return(annotationView); }
private MKAnnotationView getViewForUserAnnotation(MKMapView mapView, UserAnnotation annotation) { var annotationId = "userAnnotation"; var annotationView = mapView.DequeueReusableAnnotation(annotationId) as MKPinAnnotationView; if (annotationView == null) { annotationView = new MKPinAnnotationView(annotation, annotationId); } annotationView.PinColor = MKPinAnnotationColor.Green; annotationView.CanShowCallout = true; annotationView.Draggable = true; annotationView.RightCalloutAccessoryView = UIButton.FromType(UIButtonType.DetailDisclosure); return(annotationView); }