[core] Merge pull request #4914 from bwhtmn/camera-padding

Fix a bug in applying padding to the camera.

Fixes #4862.
This commit is contained in:
Brent W
2016-05-04 01:28:27 -07:00
committed by Minh Nguyễn
parent 5f0a01705f
commit 7e6995d153

View File

@@ -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;