Merge branch 'release-ios-v3.3.0'

After v3.3.4.
This commit is contained in:
Jason Wray
2016-08-08 17:28:44 -04:00
6 changed files with 25 additions and 10 deletions

View File

@@ -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))

View File

@@ -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.'

View File

@@ -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.'

View File

@@ -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)

View File

@@ -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;

View File

@@ -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))