private async void InfoWindow_Clicked(object sender, InfoWindowClickedEventArgs e) { RequestPopViewModel requestPopViewModel = new RequestPopViewModel(); requestPopViewModel.RequestTitle = e.Pin.Label; requestPopViewModel.PinTagHelper = (PinTagHelper)e.Pin.Tag; var page = new RequestPopUpView(requestPopViewModel); await PopupNavigation.Instance.PushAsync(page); }
private void Map_InfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { try { var proveedor = e.Pin.Tag as App7.ServiceReference1.Proveedor; this.Navigation.PushAsync(new ProveedorPage(proveedor)); } catch (System.Exception ex) { } }
private void OnMapInfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { var owner = e.Pin.Tag as Models.Owner; if (owner == null) { return; } if (this.ViewModel.OpenOwnerDetailCommand.CanExecute(owner)) { this.ViewModel.OpenOwnerDetailCommand.Execute(owner); } }
//method to open invoice details by clicking label on pin private async void Map_InfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { Pin clickedPin = e.Pin; string clickedInvoiceID = clickedPin.Tag as string; Invoice invoice = _invoicesCollection.Where(invoiceX => invoiceX.InvoiceID == clickedInvoiceID).FirstOrDefault(); _currentSelectedInvoice = invoice; if (_isDetailedPageOpen || invoice == null) { return; } _isDetailedPageOpen = true; await _navigation.PushModalAsync(new OrderDetailPage(invoice)); }
//ContentView CreateMakedoxIcon() //{ // ContentView contentView = new ContentView(); // contentView.HeightRequest = 30; // contentView.WidthRequest = 30; // contentView.IsClippedToBounds = false; // contentView.Content = new Image // { // Source = "ic_makedox_stamp.png", // HeightRequest = 30, // WidthRequest = 30 // }; // return contentView; //} void GoogleMap_InfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { string destination = e.Pin.Position.Latitude + "," + e.Pin.Position.Longitude; var urlSufix = "&daddr=" + destination; if (Device.RuntimePlatform == Device.iOS) { Device.OpenUri(new Uri("http://maps.apple.com/?saddr=Current%20Location" + urlSufix)); } else if (Device.RuntimePlatform == Device.Android) { Device.OpenUri(new Uri("http://maps.google.com/?saddr=" + urlSufix)); } }
private async void Maps_InfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { if (listHost2.Find(h => e.Pin.ZIndex == h.id) is ListInfo host) { if (string.IsNullOrWhiteSpace(host.host_url)) { return; } var page = new BookingPage(host); await Navigation.PushAsync(page, true); } if (listPlaces.Find(p => e.Pin.ZIndex == p.id) is Places place) { OpenPlace(place.id); } }
async void TheMap_InfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { if (Device.RuntimePlatform == Device.iOS) { var maps = await Shell.Current.DisplayActionSheet("Open in maps", "cancel", null, "Google Maps", "Apple Maps");//In current preview of Shell you must call actionsheets and alerts like this. if (maps == "Google Maps") { var uri = new Uri($"https://google.com/maps/place/{e.Pin.Position.Latitude},{e.Pin.Position.Longitude}"); Device.OpenUri(uri); } else if (maps == "Apple Maps") { await Xamarin.Essentials.Map.OpenAsync(e.Pin.Position.Latitude, e.Pin.Position.Longitude); } } else { await Xamarin.Essentials.Map.OpenAsync(e.Pin.Position.Latitude, e.Pin.Position.Longitude); } }
private void OnInfoWindowClicked(object sender, InfoWindowClickedEventArgs infoWindowClickedEventArgs) { Command?.Execute(infoWindowClickedEventArgs); }
private void InfoWindow_Clicked(object sender, InfoWindowClickedEventArgs e) { var time = DateTime.Now.ToString("hh:mm:ss"); labelStatus.Text = $"[{time}]InfoWindow Clicked - {e?.Pin?.Tag.ToString() ?? "nothing"}"; }
private void InfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { var job = (Job)e.Pin.BindingContext; Navigation.PushAsync(new JobPage(job)); }
private void Map_InfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { DisplayAlert("Map Sample", "This is an awesome message", "Done"); }
private async void MapOnInfoWindowClicked(object sender, InfoWindowClickedEventArgs e) { await DisplayAlert("Info clicked", $"{e.Pin?.Position.Latitude} {e.Pin?.Position.Longitude}", "Cancel"); }