summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-07-28 14:52:33 -0700
committerJason Wray <friedbunny@users.noreply.github.com>2016-07-28 14:52:33 -0700
commit438dfa947d142053d75eb606f1bd6998e8d96c56 (patch)
tree4c5a25408de7e041154b11860fc756add82ea37e
parentbc845b96b0d945cc0feea9177017d661f56a5f06 (diff)
downloadqtlocation-mapboxgl-438dfa947d142053d75eb606f1bd6998e8d96c56.tar.gz
[ios] Omit accuracy halo from annotation hit testing (#5816)
Fixes #5571.
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/src/MGLMapView.mm4
2 files changed, 3 insertions, 2 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index e3f259ddf1..1dbf22b4ba 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON
* Fixed a crash that occurred when initializing an MGLMapView on iOS 8.1 or below. ([#5791](https://github.com/mapbox/mapbox-gl-native/pull/5791))
* Fixed an issue where pan gestures that originated on view annotations would not pan the underlying map. ([#5813](https://github.com/mapbox/mapbox-gl-native/pull/5813))
+* Fixed an issue that caused the user dot to be selected when tapping an annotation that lies within the user dot’s accuracy circle. ([#5816](https://github.com/mapbox/mapbox-gl-native/pull/5816))
## 3.3.1
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index b36efe3bd7..4ec3619189 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1394,8 +1394,8 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
CGPoint tapPoint = [singleTap locationInView:self];
- if (self.userLocationVisible
- && [self.userLocationAnnotationView.layer.presentationLayer hitTest:tapPoint])
+ CALayer *hitLayer = self.userLocationVisible ? [self.userLocationAnnotationView.layer.presentationLayer hitTest:tapPoint] : nil;
+ if (hitLayer && hitLayer != self.userLocationAnnotationView.haloLayer.presentationLayer)
{
if ( ! _userLocationAnnotationIsSelected)
{