diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-26 17:56:46 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-26 17:56:46 -0800 |
commit | a662508ddde4043ece36d8ea9b424368891d892c (patch) | |
tree | a6d7b857d59a2d9ea638bd68fe2b4b38392ef576 /platform/ios/src/MGLMapView.mm | |
parent | 00598432b0cc7b8aefd63b5162ad317917eb1154 (diff) | |
parent | 042831604bab0983262146047d6be0e453b0d55d (diff) | |
download | qtlocation-mapboxgl-a662508ddde4043ece36d8ea9b424368891d892c.tar.gz |
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.1-master
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index e6ebd4492f..04e9e9bb4b 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -395,7 +395,7 @@ public: MGLinitializeRunLoop(); _isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent; - _opaque = YES; + _opaque = NO; BOOL background = [UIApplication sharedApplication].applicationState == UIApplicationStateBackground; if (!background) @@ -652,6 +652,8 @@ public: - (void)reachabilityChanged:(NSNotification *)notification { + MGLAssertIsMainThread(); + MGLReachability *reachability = [notification object]; if ( ! _isWaitingForRedundantReachableNotification && [reachability isReachable]) { @@ -718,6 +720,8 @@ public: - (void)didReceiveMemoryWarning { + MGLAssertIsMainThread(); + _mbglMap->onLowMemory(); } @@ -2634,7 +2638,7 @@ public: { CLLocationCoordinate2D centerCoordinate = MGLLocationCoordinate2DFromLatLng(cameraOptions.center ? *cameraOptions.center : _mbglMap->getLatLng()); double zoomLevel = cameraOptions.zoom ? *cameraOptions.zoom : self.zoomLevel; - CLLocationDirection direction = cameraOptions.angle ? -MGLDegreesFromRadians(*cameraOptions.angle) : self.direction; + CLLocationDirection direction = cameraOptions.angle ? mbgl::util::wrap(-MGLDegreesFromRadians(*cameraOptions.angle), 0., 360.) : self.direction; CGFloat pitch = cameraOptions.pitch ? MGLDegreesFromRadians(*cameraOptions.pitch) : _mbglMap->getPitch(); CLLocationDistance altitude = MGLAltitudeForZoomLevel(zoomLevel, pitch, centerCoordinate.latitude, self.frame.size); return [MGLMapCamera cameraLookingAtCenterCoordinate:centerCoordinate fromDistance:altitude pitch:pitch heading:direction]; |