public sealed override void DidSelectAnnotationView(MKMapView mapView, MKAnnotationView view) { if (view.Annotation is BindingMKAnnotation annotation) { if (MarkerClick?.CanExecute(annotation.Annotation) ?? false) { MarkerClick.Execute(annotation.Annotation); view.Selected = false; } } else if (view.Annotation is IBindingMKMapOverlay overlay) { if (OverlayClicked?.CanExecute(overlay.Annotation) ?? false) { OverlayClicked.Execute(overlay.Annotation); view.Selected = false; } } else if (view.Annotation == mapView.UserLocation) { var loc = view.Annotation.Coordinate.ToBinding2DLocation(); if (MyLocationClick?.CanExecute(loc) ?? false) { MyLocationClick.Execute(loc); view.Selected = false; } } }
public virtual void OnMapClick(LatLng point) { try { MarkerClick?.Execute(null); } catch { } }
public virtual bool OnMarkerClick(Marker marker) { var mAnnotation = (marker.Tag as AnnotationTag)?.Annotation; if (mAnnotation is IBindingMapAnnotation anno && (MarkerClick?.CanExecute(anno) ?? false)) { MarkerClick.Execute(anno); return(true); } return(false); }
public virtual bool OnMarkerClick(Marker marker) { try { MarkerClick?.Execute(MarkerSet.GetRawItem(marker)); return(true); } catch { } return(false); }
public Action() { this._emptyTileError = new GMap.NET.EmptyTileError(OnEmptyTileError); this._mapTypeChanged = new MapTypeChanged(OnMapTypeChanged); this._mapZoomChanged = new MapZoomChanged(OnMapZoomChanged); this._mapDrag = new MapDrag(OnMapDrag); this._tileLoadStart = new TileLoadStart(OnTileLoadStart); this._tileLoadComplete = new TileLoadComplete(OnTileLoadComplete); this._markerClick = new MarkerClick(OnMarkerClick); this._markerEnter = new MarkerEnter(OnMarkerEnter); this._markerLeave = new MarkerLeave(OnMarkerLeave); this._mouseDown = new MouseEventHandler(OnMapMouseDown); this._mouseMove = new MouseEventHandler(OnMapMouseMove); this._mouseUp = new MouseEventHandler(OnMapMouseUp); this._mouseClick = new MouseEventHandler(OnMapMouseClick); this._mouseDoubleClick = new MouseEventHandler(OnMapMouseDoubleClick); }
public async System.Threading.Tasks.Task OnMarkerClick(RadzenGoogleMapMarker marker) { await MarkerClick.InvokeAsync(marker); }