amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
544 stars 344 forks source link

InfoWindowClicked Event Works Only Once #768

Open masouri opened 3 years ago

masouri commented 3 years ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

Im using the InfoWindowClicked event to open a detail page for the clicked location, the problem is if i return from said detail page to the map, i can't fire the event again,

Because the event doesn't get griggered again i have no stacktrace

EXPECTED BEHAVIOR

If you go back from the opened page you should be able to click another InfoWindow and open again another Page


 public Location()
        {
            InitializeComponent();
            NavigationPage.SetHasBackButton(this, false);
            Title = "Suche";

            map.InfoWindowClicked += InfoWindowClicked;

            PermissionsValidation();

        }

        private async void InfoWindowClicked(object sender, InfoWindowClickedEventArgs e)
        {
            await Navigation.PushAsync(new LocationDetail(map.SelectedPin.Tag.ToString(), "location"));

        }