summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuha Alanen <juha.alanen@mapbox.com>2020-02-26 10:11:13 +0200
committerJuha Alanen <juha.alanen@mapbox.com>2020-02-26 11:21:04 +0200
commitf3c8cefc7f71de9077a7a0027c3653cf7488a0cc (patch)
tree28d42650a46922d1d4133de337cdf7b9416ca8d6
parent384681a936151eb575546e68915af6845af5441f (diff)
downloadqtlocation-mapboxgl-f3c8cefc7f71de9077a7a0027c3653cf7488a0cc.tar.gz
[core] Return pitch bounds in degrees
-rw-r--r--include/mbgl/map/bound_options.hpp4
-rw-r--r--src/mbgl/map/map.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/map/bound_options.hpp b/include/mbgl/map/bound_options.hpp
index 614a532339..6a410ad0b0 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<double> minZoom;
- /// Maximum pitch allowed.
+ /// Maximum pitch allowed in degrees.
optional<double> maxPitch;
- /// Minimum pitch allowed.
+ /// Minimum pitch allowed in degrees.
optional<double> minPitch;
};
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 994cefa868..0d9574a299 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