diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-06-25 09:42:44 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-06-25 10:20:48 -0700 |
commit | fc209e31c5452f0595c815c5948f3307ef585d10 (patch) | |
tree | 79d356fe27efa0cd5842af875c5c6716bd2b03fd /platform | |
parent | 7a30a0d316501d8dd606ece0ab220e7ec2e64088 (diff) | |
download | qtlocation-mapboxgl-fc209e31c5452f0595c815c5948f3307ef585d10.tar.gz |
Reversed direction to be clockwise
For consistency with MapKit, the Google Maps SDK, and these methods’ own documentation.
Fixes #1780.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapView.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index def2af8711..cf2274e2b0 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -1463,7 +1463,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) - (CLLocationDirection)direction { - double direction = _mbglMap->getBearing() * -1; + double direction = _mbglMap->getBearing(); while (direction > 360) direction -= 360; while (direction < 0) direction += 360; @@ -1479,7 +1479,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) CGFloat duration = (animated ? MGLAnimationDuration : 0); - _mbglMap->setBearing(direction * -1, secondsAsDuration(duration)); + _mbglMap->setBearing(direction, secondsAsDuration(duration)); [self notifyMapChange:@(animated ? mbgl::MapChangeRegionDidChangeAnimated : mbgl::MapChangeRegionDidChange)]; } |