summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorPablo Guardiola <guardiola31337@gmail.com>2017-07-27 15:38:53 +0200
committerTobrun <tobrun@mapbox.com>2017-07-28 12:06:53 +0200
commitcaba393c0ec3042a3e8e7f1a782e0283d131a996 (patch)
tree0945038b9cf8436e9d63c871707e38913d1c0ce7 /platform
parent9b770f382ef7f1251f0f770175514345899101a8 (diff)
downloadqtlocation-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.java3
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);
}
/**