void OnCalloutAccessoryControlTapped (object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKPinAnnotationView; if (!string.IsNullOrWhiteSpace (customView.Url)) { UIApplication.SharedApplication.OpenUrl (new Foundation.NSUrl (customView.Url)); } }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { //var customView = e.View as CustomMKAnnotationView; //if ( !string.IsNullOrWhiteSpace ( customView.Url ) ) { // UIApplication.SharedApplication.OpenUrl ( new Foundation.NSUrl ( customView.Url ) ); //} }
private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { CustomMKAnnotationView customView = e.View as CustomMKAnnotationView; MKPointAnnotation anno = customView.Annotation as MKPointAnnotation; CustomPin customPin = GetCustomPin(anno); customPin.OnCalloutAccessoryTapped(e); }
/* * Event when the callout is called */ async void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { //Display Alert //Go back to Mobile App Clent and call show dialog event var customView = e.View as CustomMKAnnotationView; ClinicianMapPage parent = (ClinicianMapPage)formsMap.Parent.Parent; parent.displayUserDialog(customView.Url, customView.Url[customView.Url.Length - 1].ToString()); }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { EventMapMKAnnotationView eventView = e.View as EventMapMKAnnotationView; if (!string.IsNullOrWhiteSpace(eventView.Url)) { UIApplication.SharedApplication.OpenUrl(new Foundation.NSUrl(eventView.Url)); } }
void ViewSelectedProduct(object sender, MKMapViewAccessoryTappedEventArgs e) { var annotation = e.View.Annotation as ProductAnnotation; var product = annotation.Product; var productScreen = new ProductScreen(product); this.NavigationController.PushViewController(productScreen, true); }
private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { if (!e.View.Selected) { customPinView.RemoveFromSuperview(); customPinView.Dispose(); customPinView = null; } }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKAnnotationView; if (customView.ActionInfo != null) { customView.ActionInfo(); } }
private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKAnnotationView; var customPin = _formsMap.CustomPins.FirstOrDefault(p => p.Id == customView.Id); if (customPin != null) { customPin.OnClicked(); } }
/// <summary> /// Callback for when the user taps a callout. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The event parameters.</param> private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var exhibitAnnotationView = e.View as ExhibitAnnotationView; if (exhibitAnnotationView?.Annotation is ExhibitAnnotation annotation) { var exhibitId = annotation.ExhibitId; IoCManager.Resolve <INavigationService>().PushAsync(new AppetizerPageViewModel(exhibitId)); } }
/// <summary> /// Callback for when the user taps a callout. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="e">The event parameters.</param> private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var exhibitAnnotationView = e.View as ExhibitAnnotationView; var annotation = exhibitAnnotationView?.Annotation as ExhibitAnnotation; if (annotation != null) { var exhibitId = annotation.ExhibitId; IoCManager.Resolve <INavigationService> ().PushAsync(new ExhibitDetailsViewModel(exhibitId)); } }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var formsMap = (CustomMap)Element; var customView = e.View as CustomMKPinAnnotationView; if (!string.IsNullOrWhiteSpace(customView.FormsIdentifier)) { formsMap.ShowPinDetailInfo(customView.FormsIdentifier); //return; } }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKAnnotationView; var position = new Position(customView.Annotation.Coordinate.Latitude, customView.Annotation.Coordinate.Longitude); var customPin = GetCustomPin(position); if (!string.IsNullOrWhiteSpace(customView.Url)) { //App.Current.MainPage.Navigation.PushAsync(new PinDetailPage(customPin)); Shell.Current.GoToAsync($"pinDetailPage?stopid={customPin.StopID}"); } }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKAnnotationView; if (!string.IsNullOrWhiteSpace(customView.Url)) { UIApplication.SharedApplication.OpenUrl(new Foundation.NSUrl(customView.Url)); } AccessoryClicked(customView.Position); //adds polygon Debug.WriteLine("callout clicked: " + customView.Url); //if e.toString == ? -> deletePolygon(); }
/// <summary> /// This handles when a pin's callout or popup is clicked. Used to load that pin's event. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKAnnotationView; if (!string.IsNullOrWhiteSpace(customView.Url)) { Console.WriteLine("Callout tapped"); if (!formsMap.SelectingLocation) { formsMap.PinsEvent(customView.foodFinderEvent); } } }
async void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var annotation = e.View.Annotation; var customPin = GetCustomPin(annotation as MKPointAnnotation); await Xamarin.Forms.Shell.Current.Navigation.PushAsync(new SundihomeApp.Views.PostDetailPage(customPin.PostId)); //var customView = e.View as CustomPin; //var customPin = GetCustomPin(annotation as MKPointAnnotation); //if (!string.IsNullOrWhiteSpace(customView.Url)) //{ // UIApplication.SharedApplication.OpenUrl(new Foundation.NSUrl(customView.Url)); //} }
private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var annotation = e.View?.Annotation; if (annotation == null) { return; } var pin = _customMap.CustomPins.FirstOrDefault(x => x.PlatformMarker == annotation); if (pin != null) { _customMap?.InfoWindowClicked?.Execute(pin); } }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKAnnotationView; var element = (ExtendedMap)Element; foreach (var pin in element.ItemsSource) { if (pin.Latitude == customView.Annotation.Coordinate.Latitude && pin.Longitude == customView.Annotation.Coordinate.Longitude) { if (pin.SelectCommand != null) { pin.SelectCommand.Execute(null); } } } }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { if (e.View == null) { return; } if (!(e.View is CustomMKAnnotationView)) { return; } var customView = e.View as CustomMKAnnotationView; MessagingCenter.Send <CustomPin>(customView.Pin, "ShowCrimeReport"); //if (!string.IsNullOrWhiteSpace(customView.Url)) //{ // UIApplication.SharedApplication.OpenUrl(new Foundation.NSUrl(customView.Url)); //} }
/// <summary> /// Handles the CalloutAccessoryControlTapped event of MKMapView. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">A <see cref="MKMapViewAccessoryTappedEventArgs"/> with arguments of the event.</param> private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { // If annotation is a user location do nothing // ReSharper disable once SuspiciousTypeConversion.Global if (e.View.Annotation is MKUserLocation) { return; } // Get the custom pin for annotation var anno = e.View.Annotation as MKPointAnnotation; if (anno == null) { return; } // Toggle pin favorite status var customPin = (this.Element as MapEx)?.Pins?.FirstOrDefault(p => p.InternalId.Equals(anno)); customPin?.ToggleFavoriteCommand.Execute(null); }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = e.View as CustomMKAnnotationView; }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { }
private void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { throw new NotImplementedException(); }
/// <summary> /// When the accessory control of a callout gets tapped /// </summary> /// <param name="sender">Event Sender</param> /// <param name="e">Event Arguments</param> private void OnMapCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { if (this.FormsMap.CalloutClickedCommand.CanExecute(null)) { this.FormsMap.CalloutClickedCommand.Execute(null); } }
void ViewSelectedProduct(object sender, MKMapViewAccessoryTappedEventArgs e) { var annotation = e.View.Annotation as ProductAnnotation; var product = annotation.Product; var productScreen = new ProductScreen(product); this.NavigationController.PushViewController(productScreen, true); }
void OnCalloutAccessoryControlTapped(object sender, MKMapViewAccessoryTappedEventArgs e) { var customView = (CustomMKAnnotationView)e.View; App.Locator.Map.GoToScheduleOrderCommand.Execute(null); }