You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
onSingleTapConfirmed() logic needs to be updated #3156
I have taken a look at the code that was already there and was placed in comment, but I'm not convinced by it. It is not actually calculation chance or distances, it is just taking into account the previous selected marker and iterating over the possible markers.
I'm going to see if I'm able to improve current experience by calculating the distance between the click event and the marker.
I started by visualising current touch area:
In this image you see 2 already selected areas and an actual down event. I believe current touch area is too big and I think we should limit this to 48dp ->min. requirement width/height touch surface on Android.
I lowered the bounds of the touch area, which automatically improves selection criteria without using an algorithm to determine distance between touch event and marker.
If I debugged this type of interaction with initial configuration, I would receive a callback with 3 possible touch targets. Now I'm only receiving one!
One thing I will implement in singleTapConfirmed is if there are 2 side by side and one marker is already selected, I'm going to select the other marker. That is the only use-case that I'm currently seeing that needs improvement.
Yep, this is likely technical debt from the original default marker implementation which was bigger than the current red one. Good 👀 to spot this and fix it! 👍
Activity
tobrun commentedon Jan 19, 2016
After landing bugfixes related to Marker click events in #3573,
I tried running at this issue and did some manual testing:
I was able to select the correct marker almost every time in the grey circle:
tobrun commentedon Jan 19, 2016
I have taken a look at the code that was already there and was placed in comment, but I'm not convinced by it. It is not actually calculation chance or distances, it is just taking into account the previous selected marker and iterating over the possible markers.
I'm going to see if I'm able to improve current experience by calculating the distance between the click event and the marker.
tobrun commentedon Jan 19, 2016
I started by visualising current touch area:
In this image you see 2 already selected areas and an actual down event. I believe current touch area is too big and I think we should limit this to 48dp ->min. requirement width/height touch surface on Android.
tobrun commentedon Jan 19, 2016
I lowered the bounds of the touch area, which automatically improves selection criteria without using an algorithm to determine distance between touch event and marker.
tobrun commentedon Jan 19, 2016
To demonstrate how this improves selection:
If I debugged this type of interaction with initial configuration, I would receive a callback with 3 possible touch targets. Now I'm only receiving one!
tobrun commentedon Jan 19, 2016
One thing I will implement in
singleTapConfirmedis if there are 2 side by side and one marker is already selected, I'm going to select the other marker. That is the only use-case that I'm currently seeing that needs improvement.tobrun commentedon Jan 19, 2016
You can see above implemented here:
https://www.dropbox.com/s/ycucb7t92c7nu1s/device-2016-01-19-101337.mp4?dl=0
tobrun commentedon Jan 19, 2016
It even manages overlapping markers very well:
https://www.dropbox.com/s/cp25y7mr7p243l3/device-2016-01-19-102250.mp4?dl=0
tobrun commentedon Jan 19, 2016
Going to commit and PR
tobrun commentedon Jan 19, 2016
This will land in the release branch of
3.1.0from #3537[android] #3156 - improving marker selection touch handling
tobrun commentedon Jan 19, 2016
Landed with 6b3745c in branch mentioned above.
zugaldia commentedon Jan 19, 2016
@tobrun Love it, I didn't know our touch area was so wide. By the way, this ticket is a great candidate for the 3.1.0 blog post (#3537).
tobrun commentedon Jan 19, 2016
@zugaldia
yeah that was a surprise for me as well!
cc @bleege
bleege commentedon Jan 19, 2016
Yep, this is likely technical debt from the original default marker implementation which was bigger than the current red one. Good 👀 to spot this and fix it! 👍