Include padding when testing camera scale in cameraForLatLngBounds
Repurpose LatLngBoundsToCameraWithBearingAndPitch to test scaling and camera setup, both with and without padding. This adds testing of path not covered in mapbox/mapbox-gl-native-ios#59.
This commit is contained in:
committed by
Aleksandar Stojiljković
parent
5693f3be02
commit
2fd9d4a1fe
@@ -213,7 +213,10 @@ CameraOptions cameraForLatLngs(const std::vector<LatLng>& latLngs, const Transfo
|
||||
ScreenCoordinate centerPixel = nePixel + swPixel;
|
||||
centerPixel /= 2.0;
|
||||
|
||||
return CameraOptions().withCenter(transform.screenCoordinateToLatLng(centerPixel)).withPadding(padding).withZoom(zoom);
|
||||
return CameraOptions()
|
||||
.withCenter(transform.screenCoordinateToLatLng(centerPixel))
|
||||
.withPadding(padding)
|
||||
.withZoom(zoom);
|
||||
}
|
||||
|
||||
CameraOptions Map::cameraForLatLngs(const std::vector<LatLng>& latLngs, const EdgeInsets& padding, optional<double> bearing, optional<double> pitch) const {
|
||||
|
||||
Reference in New Issue
Block a user