summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-02 14:25:32 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-03 17:02:15 +0200
commit27b798da91a591351562c037607fc3e25907c974 (patch)
tree41ad1ff6455b9606be97b48178e6a97e115cd4bd /src
parent8944e2c588b5199f090829009ea6ac9a4822cdc5 (diff)
downloadqtlocation-mapboxgl-27b798da91a591351562c037607fc3e25907c974.tar.gz
[core] Simplify TransformState::moveLatLng
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/transform_state.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp
index b9d30cf8bb..8ffc191f86 100644
--- a/src/mbgl/map/transform_state.cpp
+++ b/src/mbgl/map/transform_state.cpp
@@ -341,11 +341,11 @@ void TransformState::moveLatLng(const LatLng& latLng, const ScreenCoordinate& an
if (!latLng || !anchor) return;
auto latLngToTileCoord = [&](const LatLng& ll) -> vec2<double> {
- return { lngX(ll.longitude) / util::tileSize, latY(ll.latitude) / util::tileSize };
+ return { lngX(ll.longitude), latY(ll.latitude) };
};
auto tileCoordToLatLng = [&](const vec2<double> coord) -> LatLng {
- return { yLat(coord.y, scale), xLng(coord.x, scale) };
+ return { yLat(coord.y, worldSize()), xLng(coord.x, worldSize()) };
};
auto centerCoord = latLngToTileCoord(getLatLng(LatLng::Unwrapped));