diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-02-28 12:27:12 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-04 14:45:32 +0200 |
commit | 73ac3c784fe755650dc631e2e722a47890981248 (patch) | |
tree | a31ef2c1473964af7641a5fc341b65fd840bf6a8 /platform/qt | |
parent | 21a39306da56c5d2c88447ba5ea053a7f989480a (diff) | |
download | qtlocation-mapboxgl-73ac3c784fe755650dc631e2e722a47890981248.tar.gz |
[core] Remove map bearing setters/getters
Diffstat (limited to 'platform/qt')
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 10 |
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 ¢er) { - 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() })); } /*! |