示例#1
0
        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);
        }
示例#2
0
 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)
     {
     }
 }
示例#3
0
        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);
            }
        }
示例#4
0
        //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));
        }
示例#5
0
        //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);
            }
        }
示例#7
0
        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);
            }
        }
示例#8
0
 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"}";
        }
示例#10
0
        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");
 }
示例#12
0
 private async void MapOnInfoWindowClicked(object sender, InfoWindowClickedEventArgs e)
 {
     await DisplayAlert("Info clicked", $"{e.Pin?.Position.Latitude} {e.Pin?.Position.Longitude}", "Cancel");
 }