summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/map/map.cpp')
-rw-r--r--src/mbgl/map/map.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index b02d784e75..c3e5edc688 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -330,8 +330,8 @@ double Map::getMaxZoom() const {
void Map::setMinPitch(double minPitch) {
impl->transform.setMinPitch(minPitch * util::DEG2RAD);
- if (getPitch() < minPitch) {
- setPitch(minPitch);
+ if (impl->transform.getPitch() < minPitch) {
+ jumpTo(CameraOptions().withPitch(minPitch));
}
}
@@ -341,8 +341,8 @@ double Map::getMinPitch() const {
void Map::setMaxPitch(double maxPitch) {
impl->transform.setMaxPitch(maxPitch * util::DEG2RAD);
- if (getPitch() > maxPitch) {
- setPitch(maxPitch);
+ if (impl->transform.getPitch() > maxPitch) {
+ jumpTo(CameraOptions().withPitch(maxPitch));
}
}
@@ -389,20 +389,6 @@ void Map::resetNorth(const AnimationOptions& animation) {
easeTo(CameraOptions().withAngle(0.0), animation);
}
-#pragma mark - Pitch
-
-void Map::setPitch(double pitch, const AnimationOptions& animation) {
- easeTo(CameraOptions().withPitch(pitch), animation);
-}
-
-void Map::setPitch(double pitch, optional<ScreenCoordinate> anchor, const AnimationOptions& animation) {
- easeTo(CameraOptions().withPitch(pitch).withAnchor(anchor), animation);
-}
-
-double Map::getPitch() const {
- return impl->transform.getPitch() * util::RAD2DEG;
-}
-
#pragma mark - North Orientation
void Map::setNorthOrientation(NorthOrientation orientation) {