Fix render tests failing on Xcode 14.3 (#1046)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/map/map_impl.hpp>
|
||||
#include <mbgl/map/transform.hpp>
|
||||
#include <mbgl/math/angles.hpp>
|
||||
#include <mbgl/math/log2.hpp>
|
||||
#include <mbgl/renderer/renderer_frontend.hpp>
|
||||
#include <mbgl/renderer/renderer_observer.hpp>
|
||||
@@ -156,7 +157,7 @@ void Map::moveBy(const ScreenCoordinate& point, const AnimationOptions& animatio
|
||||
}
|
||||
|
||||
void Map::pitchBy(double pitch, const AnimationOptions& animation) {
|
||||
easeTo(CameraOptions().withPitch((impl->transform.getPitch() * util::RAD2DEG_D) - pitch), animation);
|
||||
easeTo(CameraOptions().withPitch(util::rad2deg(impl->transform.getPitch()) - pitch), animation);
|
||||
}
|
||||
|
||||
void Map::scaleBy(double scale, const std::optional<ScreenCoordinate>& anchor, const AnimationOptions& animation) {
|
||||
@@ -246,8 +247,8 @@ CameraOptions Map::cameraForLatLngs(const std::vector<LatLng>& latLngs,
|
||||
}
|
||||
|
||||
return mbgl::cameraForLatLngs(latLngs, transform, padding)
|
||||
.withBearing(-transform.getBearing() * util::RAD2DEG_D)
|
||||
.withPitch(transform.getPitch() * util::RAD2DEG_D);
|
||||
.withBearing(util::rad2deg(-transform.getBearing()))
|
||||
.withPitch(util::rad2deg(transform.getPitch()));
|
||||
}
|
||||
|
||||
CameraOptions Map::cameraForGeometry(const Geometry<double>& geometry,
|
||||
@@ -346,8 +347,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() * util::RAD2DEG_D)
|
||||
.withMaxPitch(impl->transform.getState().getMaxPitch() * util::RAD2DEG_D);
|
||||
.withMinPitch(util::rad2deg(impl->transform.getState().getMinPitch()))
|
||||
.withMaxPitch(util::rad2deg(impl->transform.getState().getMaxPitch()));
|
||||
}
|
||||
|
||||
// MARK: - Map options
|
||||
|
||||
Reference in New Issue
Block a user