charlenni / Mapsui.Forms

Xamarin.Forms wrapper around Mapsui
MIT License
6 stars 3 forks source link

PinClicked #11

Open ptufail opened 5 years ago

ptufail commented 5 years ago

Hi,

I'm using Mapsui.Forms(last version 2.0.0-beta.17) and i have a problem with PinClicked event.

What i want is when the user click in the pin, I want to navigate to another page, however when I click in the pin, the event cancel the navigation and always show a popup with pin label

My Code

private async void MapView_PinClicked(object sender, PinClickedEventArgs e) {
e.Handled = true; var id = (long)e.Pin.Tag; var result = await _productServices.GetProductAsync(id); var param = new NavigationParameters(); param.Add("Product", result.Data);
await NavigationService.NavigateAsync("ServiceDetailPage", param); }

charlenni commented 5 years ago

Hello @ptufail,

do you have an example app for this? I checked the code, but couldn't find any place, where this could happen. The callout is only shown in the example when you set e.Pin.IsCalloutVisible = !e.Pin.IsCalloutVisible;.

Btw. you should use the Mapsui issues for this. Mapsui.Forms is now a part of Mapsui.