Esempio n. 1
0
        protected override void AddCustomerToMap(Customer customer)
        {
            var annotation = new CustomerAnnotation(new
                                                    CLLocationCoordinate2D
            {
                Latitude  = customer.Latitude,
                Longitude = customer.Longitude
            },
                                                    customer);

            _nativeMap.AddAnnotation(annotation);
        }
Esempio n. 2
0
        private MKAnnotationView GetViewForCustomerAnnotation(CustomerAnnotation annotation)
        {
            var annotationView = _nativeMap.DequeueReusableAnnotation(CustomerAnnotationView.CustomReuseIdentifier) as CustomerAnnotationView;

            if (annotationView == null)
            {
                annotationView = new CustomerAnnotationView(annotation, annotation.Customer);
            }
            else
            {
                annotationView.Customer = annotation.Customer;
            }

            return(annotationView);
        }