Reputation: 929
I have this code:
private async void Pin_MarkerClicked(object sender, PinClickedEventArgs e)
{
try
{
var popup = new PinPopUp(Convert.ToInt64(((Pin)sender).ClassId));
App.Current.MainPage.ShowPopup(popup);
}
catch(Exception ex)
{
Crashes.TrackError(ex);
}
}
which loads a popup when you click on a pin. On Android when you dismiss the popup you can click immediately on the same pin and the event will fire again, no issues.
On iOS the pins seems to have a 'selected/active' state that gets engaged after pin click (the pin appears larger on the screen) and after the popup is dismissed, the only way to select the pin again is to click on another pin or on the map to get the pin in the 'unselected' state, and then the user can re-select the pin.
Is there a way to reset the pin to make it selectable again? I see nothing applicable in the PIN properties or methods.
Upvotes: 0
Views: 350
Reputation: 929
So in the Pin_InfoWindowClicked event you set e.HideInfoWindow = true, this keeps the pin in a state that's ready to be clicked again on iOS. I don't think that's a great name for that property as it doesn't actually hide your info window (thankfully) on iOS. It does hide it on Android so I had to put in a check to not add this line for Android.
Upvotes: 0