예제 #1
0
        protected override void AddIncidentToMap(IncidentModel incident)
        {
            var annotation = new IncidentAnnotation(new
                                                    CLLocationCoordinate2D
            {
                Latitude  = incident.Latitude,
                Longitude = incident.Longitude
            },
                                                    incident);

            _nativeMap.AddAnnotation(annotation);
        }
예제 #2
0
        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);
        }