Open mdmota opened 4 years ago
hey @mdmota did you solve this? I have the same question
hey @mdmota did you solve this? I have the same question
Yes, In the On DidSelectAnnotationView method I have replaced the image of the marke with a larger image with a white area. So I managed to get the click in that area.
`void OnDidSelectAnnotationView(object sender, MKAnnotationViewEventArgs e) { try { CustomMKAnnotationView customView = e.View as CustomMKAnnotationView; customView.Image = UIImage.FromFile("markerIconClicked.png"); customPinView = new UIView();
CustomPin customPin = customPins.FirstOrDefault(p => p.Label.Equals(customView.ReuseIdentifier));
Action action = () => {
NavegaParaUnidade(customPin);
if (customPinView != null)
{
customPinView.RemoveFromSuperview();
customPinView.Dispose();
customPinView = null;
}
};
ges = new UITapGestureRecognizer(action);
customPinView.Frame = new CGRect(0, 0, 200, 100);
customPinView.AddSubview(CriaView(customPin));
customPinView.Center = new CGPoint(90, -8);
customView.AddGestureRecognizer(ges);
customView.AddSubview(customPinView);
}
catch (Exception)
{
//TODO
}
}`
With this plugin is it possible to customize the Callout/InfoWindow? I need to create a custom callout with a button that triggers an event when it is clicked.
I got it on android, but not on ios work.
See reference: