Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Fix round-tripping between pixelForLatLng() / latLngForPixel() #1827

Merged
merged 1 commit into from
Jul 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mbgl/map/transform_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down