summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-02-27 19:58:20 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-04 14:45:32 +0200
commit491fce68790e05cd0a876815751dc5cb72a2761e (patch)
treeb735688c802407f38fe6fdbc5c32a8bd6c5ca93e /src
parent02f2b9c75c4031c084c177a582f18d3e888596fa (diff)
downloadqtlocation-mapboxgl-491fce68790e05cd0a876815751dc5cb72a2761e.tar.gz
[core] Added Map::pitchBy()
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 25c4b5398d..ab4ccb2007 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -317,6 +317,12 @@ void Map::resetZoom() {
setZoom(0);
}
+#pragma mark - Pitch
+
+void Map::pitchBy(double pitch, const AnimationOptions& animation) {
+ easeTo(CameraOptions().withPitch((impl->transform.getPitch() * util::RAD2DEG) - pitch), animation);
+}
+
#pragma mark - Bounds
optional<LatLngBounds> Map::getLatLngBounds() const {