diff options
author | Jason Wray <jason@mapbox.com> | 2016-08-08 17:28:44 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2016-08-08 17:31:11 -0400 |
commit | 82f19b94f7697d18adf6f9d0eb3b5b3d3b67e4a4 (patch) | |
tree | 9d4b21862e8c84748f8f522a439216ff422a6f40 | |
parent | 7597a050b4556cedbe2565a182144b1b2d94ef19 (diff) | |
parent | c64a0c24866b9d199153a1fe65c455d5807b50a6 (diff) | |
download | qtlocation-mapboxgl-82f19b94f7697d18adf6f9d0eb3b5b3d3b67e4a4.tar.gz |
Merge branch 'release-ios-v3.3.0'
After v3.3.4.
-rw-r--r-- | platform/ios/CHANGELOG.md | 6 | ||||
-rw-r--r-- | platform/ios/Mapbox-iOS-SDK-symbols.podspec | 2 | ||||
-rw-r--r-- | platform/ios/Mapbox-iOS-SDK.podspec | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 18 | ||||
-rw-r--r-- | platform/ios/src/MGLUserLocationAnnotationView.h | 1 | ||||
-rw-r--r-- | platform/ios/src/MGLUserLocationAnnotationView.m | 6 |
6 files changed, 25 insertions, 10 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 89f301ea37..3a0a70f4cf 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog for Mapbox iOS SDK -Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. +Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. ## master @@ -14,6 +14,10 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON * Fixed an issue where annotation views could be assigned to multipoint annotations. ([#5770](https://github.com/mapbox/mapbox-gl-native/pull/5770)) * Fixed the static only framework build. ([#5782](https://github.com/mapbox/mapbox-gl-native/issues/5782)) +## 3.3.4 - August 8, 2016 + +* Fixed an issue that caused the user dot to be selected when tapping an annotation that lies within the user dot’s accuracy circle. First attempt was [#5816](https://github.com/mapbox/mapbox-gl-native/pull/5816) in v3.3.2, which excluded the pulsing halo but not the accuracy circle. ([#5894](https://github.com/mapbox/mapbox-gl-native/pull/5894)) + ## 3.3.3 - July 29, 2016 * Fixes an issue where the style zoom levels were not respected when deciding when to render a layer. ([#5811](https://github.com/mapbox/mapbox-gl-native/issues/5811)) diff --git a/platform/ios/Mapbox-iOS-SDK-symbols.podspec b/platform/ios/Mapbox-iOS-SDK-symbols.podspec index cfcc54d325..35c394f39b 100644 --- a/platform/ios/Mapbox-iOS-SDK-symbols.podspec +++ b/platform/ios/Mapbox-iOS-SDK-symbols.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'Mapbox-iOS-SDK' - m.version = '3.3.3-symbols' + m.version = '3.3.4-symbols' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' diff --git a/platform/ios/Mapbox-iOS-SDK.podspec b/platform/ios/Mapbox-iOS-SDK.podspec index a315085f3a..69704e8f3b 100644 --- a/platform/ios/Mapbox-iOS-SDK.podspec +++ b/platform/ios/Mapbox-iOS-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'Mapbox-iOS-SDK' - m.version = '3.3.3' + m.version = '3.3.4' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index b0c213ebfb..9ef042ad3e 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1392,17 +1392,21 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) return; } - CGPoint tapPoint = [singleTap locationInView:self]; - - CALayer *hitLayer = self.userLocationVisible ? [self.userLocationAnnotationView.layer.presentationLayer hitTest:tapPoint] : nil; - if (hitLayer && hitLayer != self.userLocationAnnotationView.haloLayer.presentationLayer) + if (self.userLocationVisible) { - if ( ! _userLocationAnnotationIsSelected) + CGPoint tapPointForUserLocation = [singleTap locationInView:self.userLocationAnnotationView]; + CALayer *hitLayer = [self.userLocationAnnotationView.hitTestLayer hitTest:tapPointForUserLocation]; + if (hitLayer) { - [self selectAnnotation:self.userLocation animated:YES]; + if ( ! _userLocationAnnotationIsSelected) + { + [self selectAnnotation:self.userLocation animated:YES]; + } + return; } - return; } + + CGPoint tapPoint = [singleTap locationInView:self]; MGLAnnotationTag hitAnnotationTag = [self annotationTagAtPoint:tapPoint persistingResults:YES]; if (hitAnnotationTag != MGLAnnotationTagNotFound) diff --git a/platform/ios/src/MGLUserLocationAnnotationView.h b/platform/ios/src/MGLUserLocationAnnotationView.h index 40432581fd..f6b62f2b23 100644 --- a/platform/ios/src/MGLUserLocationAnnotationView.h +++ b/platform/ios/src/MGLUserLocationAnnotationView.h @@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, weak) MGLMapView *mapView; @property (nonatomic) MGLUserLocation *annotation; @property (nonatomic, readonly, nullable) CALayer *haloLayer; +@property (nonatomic, readonly) CALayer *hitTestLayer; - (instancetype)initInMapView:(MGLMapView *)mapView NS_DESIGNATED_INITIALIZER; - (void)setupLayers; diff --git a/platform/ios/src/MGLUserLocationAnnotationView.m b/platform/ios/src/MGLUserLocationAnnotationView.m index c514026e42..3ab2c5a796 100644 --- a/platform/ios/src/MGLUserLocationAnnotationView.m +++ b/platform/ios/src/MGLUserLocationAnnotationView.m @@ -147,6 +147,12 @@ const CGFloat MGLUserLocationAnnotationArrowSize = MGLUserLocationAnnotationPuck } } +- (CALayer *)hitTestLayer +{ + // only the main dot should be interactive (i.e., exclude the accuracy ring and halo) + return _dotBorderLayer ?: _puckDot; +} + - (void)setupLayers { if (CLLocationCoordinate2DIsValid(self.annotation.coordinate)) |