summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorPablo Guardiola <guardiola31337@gmail.com>2017-07-27 15:38:53 +0200
committerGitHub <noreply@github.com>2017-07-27 15:38:53 +0200
commit175e7e26e2008d1e55664bd1064536c23b6de86a (patch)
tree105713e97d9ef0a6a4f8d8a027b951f4fa1cf773 /platform
parent39face8e1017b83fb8a9da99224e5ac02e22d6cd (diff)
downloadqtlocation-mapboxgl-175e7e26e2008d1e55664bd1064536c23b6de86a.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 e8891429f9..e71d509fcf 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
@@ -427,7 +427,8 @@ public final class UiSettings {
return;
}
- compassView.update(cameraPosition.bearing);
+ double clockwiseBearing = -cameraPosition.bearing;
+ compassView.update(clockwiseBearing);
}
/**