diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-03-22 23:09:30 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-03-22 23:09:30 -0700 |
commit | 80beb46c815be87b99e3004c9b2995ff644f61c3 (patch) | |
tree | 43e14f9facfb609dc6367216d27e9cfc5b71874d /platform | |
parent | 1268c627456f05b8d7ba25026c051c59f2d9df4a (diff) | |
download | qtlocation-mapboxgl-80beb46c815be87b99e3004c9b2995ff644f61c3.tar.gz |
Revert "bring in tweaked compass snapping fixes from @friedbunny"
See #1064: problematic & can wait until after beta
This reverts commit 9dd9bd6e9ddf40ae3ae1746b191ce7d0a8ea0842.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapView.mm | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 96ae0b5c25..8593e9da5c 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -703,8 +703,6 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr; [self unrotateIfNeededAnimated:YES]; - [self snapCompassIfNeeded]; - [self notifyMapChange:@(mbgl::MapChangeRegionDidChangeAnimated)]; } } @@ -1712,7 +1710,7 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng) return (self.zoomLevel > 3); } -// correct rotations to north as needed at low zooms +// correct rotations to north as needed // - (void)unrotateIfNeededAnimated:(BOOL)animated { @@ -1886,22 +1884,6 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng) } } -// reset north on very small gesture-induced angles -// -- (void)snapCompassIfNeeded -{ - double degrees = mbglMap->getBearing() * -1; - while (degrees >= 360) degrees -= 360; - while (degrees < 0) degrees += 360; - - double tolerance = 7; - - if (self.compass.alpha > 0 && (degrees < tolerance || degrees > 360 - tolerance)) - { - [self resetNorthAnimated:YES]; - } -} - + (UIImage *)resourceImageNamed:(NSString *)imageName { if ( ! [[imageName pathExtension] length]) |