Fixed round-tripping between pixelForLatLng() / latLngForPixel()

Followup to cfa2eaf5c2 for #1406.
This commit is contained in:
Minh Nguyễn
2015-07-02 10:21:15 -07:00
parent f5f19d0eb0
commit 9361cbfd5f

View File

@@ -218,8 +218,8 @@ const LatLng TransformState::latLngForPixel(const vec2<double> pixel) const {
LatLng ll = getLatLng();
double zoom = getZoom();
const double centerX = width / 2;
const double centerY = height / 2;
const double centerX = static_cast<double>(width) / 2.0;
const double centerY = static_cast<double>(height) / 2.0;
const double m = Projection::getMetersPerPixelAtLatitude(0, zoom);