From f3c8cefc7f71de9077a7a0027c3653cf7488a0cc Mon Sep 17 00:00:00 2001 From: Juha Alanen Date: Wed, 26 Feb 2020 10:11:13 +0200 Subject: [PATCH] [core] Return pitch bounds in degrees --- include/mbgl/map/bound_options.hpp | 4 ++-- src/mbgl/map/map.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mbgl/map/bound_options.hpp b/include/mbgl/map/bound_options.hpp index 614a53233..6a410ad0b 100644 --- a/include/mbgl/map/bound_options.hpp +++ b/include/mbgl/map/bound_options.hpp @@ -36,10 +36,10 @@ struct BoundOptions { /// Minimum zoom level allowed. optional minZoom; - /// Maximum pitch allowed. + /// Maximum pitch allowed in degrees. optional maxPitch; - /// Minimum pitch allowed. + /// Minimum pitch allowed in degrees. optional minPitch; }; diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 994cefa86..0d9574a29 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -332,8 +332,8 @@ BoundOptions Map::getBounds() const { .withLatLngBounds(impl->transform.getState().getLatLngBounds()) .withMinZoom(impl->transform.getState().getMinZoom()) .withMaxZoom(impl->transform.getState().getMaxZoom()) - .withMinPitch(impl->transform.getState().getMinPitch()) - .withMaxPitch(impl->transform.getState().getMaxPitch()); + .withMinPitch(impl->transform.getState().getMinPitch() * util::RAD2DEG) + .withMaxPitch(impl->transform.getState().getMaxPitch() * util::RAD2DEG); } #pragma mark - Map options