summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2017-07-28 10:22:16 -0700
committerGitHub <noreply@github.com>2017-07-28 10:22:16 -0700
commitb0bae6d1dde4e8c3b0b0b50d4255e1073f36022a (patch)
treec281f9fd992ee1d9af1d8f4c8cdb01f59dc3c253
parentcaba393c0ec3042a3e8e7f1a782e0283d131a996 (diff)
downloadqtlocation-mapboxgl-b0bae6d1dde4e8c3b0b0b50d4255e1073f36022a.tar.gz
[ios] tilt gesture type fix (#9642)
* [ios] Change function:angleBetweenPoints return type * [ios] Update changelog
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/src/MGLMapView.mm10
2 files changed, 6 insertions, 5 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index a8efb491dd..43df49a9ac 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Reduced the size of the dynamic framework by optimizing symbol visibility. ([#7604](https://github.com/mapbox/mapbox-gl-native/pull/7604))
* Fixed an issue where the attribution button would have its custom tint color reset when the map view received a tint color change notification, such as when an alert controller was presented. ([#9598](https://github.com/mapbox/mapbox-gl-native/pull/9598))
* Improved the behavior of zoom gestures when the map reaches the minimum zoom limit. ([#9626](https://github.com/mapbox/mapbox-gl-native/pull/9626))
+* Fixed an issue where tilt gesture was triggered with two fingers aligned vertically and panning down. ([#9571](https://github.com/mapbox/mapbox-gl-native/pull/9571))
* Bitcode symbol maps (.bcsymbolmap files) are now included with the dynamic framework. ([#9613](https://github.com/mapbox/mapbox-gl-native/pull/9613))
## 3.6.0 - June 29, 2017
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 8dbf26da55..9cc4c42e5a 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1848,7 +1848,7 @@ public:
east = swap;
}
- float horizontalToleranceDegrees = 60.0;
+ CLLocationDegrees horizontalToleranceDegrees = 60.0;
if ([self angleBetweenPoints:west east:east] > horizontalToleranceDegrees) {
return NO;
}
@@ -1876,12 +1876,12 @@ public:
return ([validSimultaneousGestures containsObject:gestureRecognizer] && [validSimultaneousGestures containsObject:otherGestureRecognizer]);
}
-- (float)angleBetweenPoints:(CGPoint)west east:(CGPoint)east
+- (CLLocationDegrees)angleBetweenPoints:(CGPoint)west east:(CGPoint)east
{
- float slope = (west.y - east.y) / (west.x - east.x);
+ CGFloat slope = (west.y - east.y) / (west.x - east.x);
- float angle = atan(fabs(slope));
- float degrees = MGLDegreesFromRadians(angle);
+ CGFloat angle = atan(fabs(slope));
+ CLLocationDegrees degrees = MGLDegreesFromRadians(angle);
return degrees;
}