summaryrefslogtreecommitdiff
path: root/platform/qt
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-02-28 12:27:12 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-04 14:45:32 +0200
commit73ac3c784fe755650dc631e2e722a47890981248 (patch)
treea31ef2c1473964af7641a5fc341b65fd840bf6a8 /platform/qt
parent21a39306da56c5d2c88447ba5ea053a7f989480a (diff)
downloadqtlocation-mapboxgl-73ac3c784fe755650dc631e2e722a47890981248.tar.gz
[core] Remove map bearing setters/getters
Diffstat (limited to 'platform/qt')
-rw-r--r--platform/qt/src/qmapboxgl.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index cdeb4a962a..3f3b40b7a8 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -855,17 +855,21 @@ void QMapboxGL::jumpTo(const QMapboxGLCameraOptions& camera)
*/
double QMapboxGL::bearing() const
{
- return d_ptr->mapObj->getBearing();
+ return *d_ptr->mapObj->getCameraOptions().angle;
}
void QMapboxGL::setBearing(double degrees)
{
- d_ptr->mapObj->setBearing(degrees, d_ptr->margins);
+ d_ptr->mapObj->jumpTo(mbgl::CameraOptions()
+ .withAngle(degrees)
+ .withPadding(d_ptr->margins));
}
void QMapboxGL::setBearing(double degrees, const QPointF &center)
{
- d_ptr->mapObj->setBearing(degrees, mbgl::ScreenCoordinate { center.x(), center.y() });
+ d_ptr->mapObj->jumpTo(mbgl::CameraOptions()
+ .withAngle(degrees)
+ .withAnchor(mbgl::ScreenCoordinate { center.x(), center.y() }));
}
/*!