Ejemplo n.º 1
0
        public override void DidDeselectAnnotationView(MKMapView mapView, MKAnnotationView view)
        {
            var customMapView = mapView as CustomMKMapView;

            if (customMapView != null &&
                customMapView.IsBeingTouched &&
                SelectAnnotationCommand != null &&
                SelectAnnotationCommand.CanExecute(null))
            {
                SelectAnnotationCommand.Execute(null);
            }
        }
Ejemplo n.º 2
0
        public override void DidSelectAnnotationView(MKMapView mapView, MKAnnotationView view)
        {
            var mapAnnotation = view.Annotation as IMapAnnotation;
            var customMapView = mapView as CustomMKMapView;

            if (mapAnnotation != null &&
                customMapView != null &&
                customMapView.IsBeingTouched &&
                SelectAnnotationCommand != null &&
                SelectAnnotationCommand.CanExecute(mapAnnotation.DataContext))
            {
                SelectAnnotationCommand.Execute(mapAnnotation.DataContext);
            }
        }