protected override void AddIncidentToMap(IncidentModel incident) { var annotation = new IncidentAnnotation(new CLLocationCoordinate2D { Latitude = incident.Latitude, Longitude = incident.Longitude }, incident); _nativeMap.AddAnnotation(annotation); }
private MKAnnotationView GetViewForIncidentAnnotation(IncidentAnnotation annotation) { var annotationView = _nativeMap.DequeueReusableAnnotation(IncidentAnnotationView.CustomReuseIdentifier) as IncidentAnnotationView; if (annotationView == null) { annotationView = new IncidentAnnotationView(annotation, annotation.Incident); annotationView.OnClose += OnIncidentInfoWindowClose; annotationView.OnNavigationRequested += OnIncidentInfoNavigationRequest; } else { annotationView.Incident = annotation.Incident; } return(annotationView); }