diff options
author | Pablo Guardiola <guardiola31337@gmail.com> | 2017-07-27 15:38:53 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2017-07-28 12:06:53 +0200 |
commit | caba393c0ec3042a3e8e7f1a782e0283d131a996 (patch) | |
tree | 0945038b9cf8436e9d63c871707e38913d1c0ce7 /platform | |
parent | 9b770f382ef7f1251f0f770175514345899101a8 (diff) | |
download | qtlocation-mapboxgl-caba393c0ec3042a3e8e7f1a782e0283d131a996.tar.gz |
[android] fix compass direction (Transform::getCameraOptions returns counterclockwise angle after transform.invalidateCameraPosition() which needs to be transformed to a clockwise bearing) (#9632)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java index 7f8ba21e3e..3f43c23a7f 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java @@ -421,7 +421,8 @@ public final class UiSettings { return; } - compassView.update(cameraPosition.bearing); + double clockwiseBearing = -cameraPosition.bearing; + compassView.update(clockwiseBearing); } /** |