Bug 30832 - Xamarin.Forms.Maps clickevent is triggered for wrong pin on iOS
Summary: Xamarin.Forms.Maps clickevent is triggered for wrong pin on iOS
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-06-05 04:21 UTC by Daniel Hindrikes
Modified: 2017-02-09 22:46 UTC (History)
8 users (show)

Tags: ac pins
Is this bug a regression?: ---
Last known good build:


Attachments
Code (1.02 MB, application/zip)
2015-06-11 07:22 UTC, Daniel Hindrikes
Details
Video that shows the bug (105 bytes, text/plain)
2015-06-12 02:19 UTC, Daniel Hindrikes
Details
Video from app start to bug (105 bytes, text/plain)
2015-06-15 07:00 UTC, Daniel Hindrikes
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Daniel Hindrikes 2015-06-05 04:21:15 UTC
I hava a map with pins that shows where stores is located. When I click on a pin I want mote information about the store. But on iOS the click event is triggered for the wrong pin. It working for Windows Phone and Android. I'm using the latest stable version of Xamarin.Forms and Xamarin.Forms.Maps (1.4.2.6359).

In the code below, pinStore.Key will be the pin. 

var stores =  ViewModel.LoadPinsForStores();
foreach (var pinStore in stores)
{
     pinStore.Key.Clicked += (s, a) =>
     {
            Navigation.PushAsync(ViewFactory.CreatePage<StoreDetailsViewModel, Page>((view, page) => view.StoreId = pinStore.Value.Id) as Page);
            };


           map.Pins.Add(pinStore.Key);
}
Comment 1 Rui Marinho 2015-06-11 06:14:10 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue we would very much appreciate it.

Warm regards,
Xamarin Forms Team
Comment 2 Daniel Hindrikes 2015-06-11 07:22:22 UTC
Created attachment 11568 [details]
Code
Comment 3 Daniel Hindrikes 2015-06-11 07:25:24 UTC
I have created an attachement with a Xamarin.Forms project. I have hard to recreate the bug first, but when I zoomed in  and panned around in the map I got the same behavior here. Not on all pins but on many of them. You can see that the store name not is the same on the pin label as on the page that load when you click the label.
Comment 4 Rui Marinho 2015-06-11 18:28:47 UTC
Can you send me a screencast? i m not being able to reproduce, if you open the pin and click the detail you will always get the right page.
Comment 5 Daniel Hindrikes 2015-06-12 02:19:31 UTC
Created attachment 11582 [details]
Video that shows the bug

I have recorded a video that shows the bug.
Comment 6 Rui Marinho 2015-06-15 06:10:04 UTC
Can you record how to get there.. thanks.
Comment 7 Daniel Hindrikes 2015-06-15 07:00:02 UTC
Created attachment 11602 [details]
Video from app start to bug

You can se the bug appearing on the two last pins I clicking, the first ones working. But when I zooming and panning something is going wrong.
Comment 8 Rui Marinho 2015-06-15 07:28:15 UTC
Ok, thanks.
Comment 9 Jean 2016-08-22 22:42:42 UTC
Have this been fixed? An user of my app noticed the same behavior.
Comment 10 adrianknight89 2016-11-18 23:53:45 UTC
I cannot duplicate this in 2.3.3-pre4. Can you re-test?
Comment 11 Jimmy [MSFT] 2017-02-09 22:46:48 UTC
I was not able to reproduce this issue using the attached repro and the following Forms versions:

1.4.4.6387: GOOD
2.3.3.180:   GOOD
2.3.4-pre2: GOOD

If you are experiencing this issue or a similar one with Forms 2.3.3.180 or newer, please file a new bug report with as many details as you can and include a reproduction case if possible. Thanks!