summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrent W <bwhtmn@gmail.com>2016-05-04 01:28:27 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-05-04 01:28:27 -0700
commit7e6995d153f78ea3ef283acacb204e7e4e8684ec (patch)
tree79164e7df99e701d3a9734ba966f07365c018300 /src
parent5f0a01705f839d0236652f7fbe7751ec0923cfed (diff)
downloadqtlocation-mapboxgl-7e6995d153f78ea3ef283acacb204e7e4e8684ec.tar.gz
[core] Merge pull request #4914 from bwhtmn/camera-padding
Fix a bug in applying padding to the camera. Fixes #4862.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 2a0246b654..a1dd9b6a77 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -523,7 +523,7 @@ CameraOptions Map::cameraForLatLngs(const std::vector<LatLng>& latLngs, optional
padding->left / minScale,
padding->bottom / minScale,
};
- centerPixel = centerPixel - paddedNEPixel - paddedSWPixel;
+ centerPixel = centerPixel + paddedNEPixel - paddedSWPixel;
}
centerPixel /= 2;