summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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