From 7e6995d153f78ea3ef283acacb204e7e4e8684ec Mon Sep 17 00:00:00 2001 From: Brent W Date: Wed, 4 May 2016 01:28:27 -0700 Subject: [PATCH] [core] Merge pull request #4914 from bwhtmn/camera-padding Fix a bug in applying padding to the camera. Fixes #4862. --- src/mbgl/map/map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 2a0246b65..a1dd9b6a7 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -523,7 +523,7 @@ CameraOptions Map::cameraForLatLngs(const std::vector& latLngs, optional padding->left / minScale, padding->bottom / minScale, }; - centerPixel = centerPixel - paddedNEPixel - paddedSWPixel; + centerPixel = centerPixel + paddedNEPixel - paddedSWPixel; } centerPixel /= 2;