diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-02-27 19:58:35 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-04 14:45:32 +0200 |
commit | 21a39306da56c5d2c88447ba5ea053a7f989480a (patch) | |
tree | 7b932a7bb81c2de64546ef52bd72feb5aa4317c7 /src/mbgl | |
parent | f5f10ec11989ccb403c2cd4261db74c44b263558 (diff) | |
download | qtlocation-mapboxgl-21a39306da56c5d2c88447ba5ea053a7f989480a.tar.gz |
[core] Remove map pitch setters/getters
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/map/map.cpp | 22 |
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) { |