Mapbox-gl-native: Tapping annotation within user location accuracy halo selects user location annotation

Created on 5 Jul 2016  路  12Comments  路  Source: mapbox/mapbox-gl-native

Platform: iOS 9.3
Mapbox SDK version: 3.3.0 beta 3

Steps to trigger behavior

(Screenshot below)

  1. Add annotation near user location
  2. Set it to show callout view
  3. When annotation is in range of user location accuracy (blue circle) it is impossible to show callout view (marker is not tappable). Instead of that we get callout for user location annotation

Expected behavior

When annotation in blue circle is tapped it should show its callout.

Actual behavior

When annotation in blue circle is tapped user location annotation is presented.

aaa

annotations bug iOS

Most helpful comment

It would be awesome to have that fix as soon as possible. Now I'm stuck to the release v3.2.3 because of that. I want to start using MGLAnnotationView with the selected state support but I can't have this problem in the app. Thanks!

All 12 comments

This issue reproduces in v3.3.0 but not v3.2.0.

The regression was introduced in #1582. We now hit-test the user location annotation view based on its layer.presentationLayer, since the view can move around with implicit animation in response to the user location changing. We apparently should be hit-testing based on the presentationLayer of _puckDot or _dotLayer.

A fix for this should probably be done in conjunction with @frederoni鈥檚 refactor in #5573 or wait for that to land.

I think we can land a more targeted fix in v3.3.2.

Fixed by #5816.

The problem is still happening in the v3.3.3. I can't select an annotation within the user location's accuracy range.

True, #5816 excluded the pulsing halo layer but not the static accuracy ring.

e4a9173a2a5c585dda3fa7a0f955cff1552f8d25 in #5882 includes a more comprehensive fix that specifically hit-checks the main dot. That will go in v3.4.0, but we could consider porting a similar fix to yet another patch release... @1ec5?

It would be awesome to have that fix as soon as possible. Now I'm stuck to the release v3.2.3 because of that. I want to start using MGLAnnotationView with the selected state support but I can't have this problem in the app. Thanks!

This was fixed in #5894, which is now available in the v3.3.4 release.

Thank you!

Thanks, it now works as it should.

Cool, thanks!

Was this page helpful?
0 / 5 - 0 ratings