Ejemplo n.º 1
0
            public override void AnnotationViewDidChangeDragState(
                BMKMapView mapView, BMKAnnotationView view,
                BMKAnnotationViewDragState newState, BMKAnnotationViewDragState oldState)
            {
                //Debug.WriteLine(oldState + " => " + newState);
                // None => Starting
                // Starting => Dragging
                // Dragging => Dragging
                // Dragging => Ending
                Pin annotation = map.Map.Pins.Find(view.Annotation);

                if (BMKAnnotationViewDragState.Starting == newState)
                {
                    annotation?.SendDrag(AnnotationDragState.Starting);
                    return;
                }

                if (BMKAnnotationViewDragState.Dragging == newState &&
                    null != annotation)
                {
                    map.pinImpl.NotifyUpdate(annotation);
                    annotation.SendDrag(AnnotationDragState.Dragging);
                    return;
                }

                if (BMKAnnotationViewDragState.Ending == newState &&
                    null != annotation)
                {
                    map.pinImpl.NotifyUpdate(annotation);
                    annotation.SendDrag(AnnotationDragState.Ending);
                }
            }
Ejemplo n.º 2
0
            public override void DidSelectAnnotationView(BMKMapView mapView, BMKAnnotationView view)
            {
                Pin annotation = map.Map.Pins.Find(view.Annotation);

                view.SetSelected(false, true);
                annotation?.SendClicked();
            }
Ejemplo n.º 3
0
 public override void DidDeselectAnnotationView(BMKMapView mapView, BMKAnnotationView view)
 {
     //Pin annotation = Map.Pins.Find(view.Annotation);
     //annotation?.SendDeselected();
 }