diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-10-18 12:12:57 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-10-19 08:11:41 +0300 |
commit | 2188d68b6c09dec676c294223aa7d1a4c24c85f0 (patch) | |
tree | 8b2d18726e7e3bc3990536e29a2500a9889fd006 /src/mbgl/util | |
parent | f01a829dc9e076abeb7df90259e8e5c7d9cfbad6 (diff) | |
download | qtlocation-mapboxgl-2188d68b6c09dec676c294223aa7d1a4c24c85f0.tar.gz |
[core] Move TransformState::{un,}project() to Projection
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/tile_coordinate.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/util/tile_coordinate.hpp b/src/mbgl/util/tile_coordinate.hpp index 194a62ecef..46073c0dc9 100644 --- a/src/mbgl/util/tile_coordinate.hpp +++ b/src/mbgl/util/tile_coordinate.hpp @@ -5,6 +5,7 @@ #include <mbgl/tile/geometry_tile_data.hpp> #include <mbgl/tile/tile_id.hpp> #include <mbgl/util/geometry.hpp> +#include <mbgl/util/projection.hpp> namespace mbgl { @@ -19,7 +20,7 @@ public: static TileCoordinate fromLatLng(const TransformState& state, double zoom, const LatLng& latLng) { const double scale = std::pow(2, zoom - state.getZoom()); - return { state.project(latLng) * scale / double(util::tileSize), zoom }; + return { Projection::project(latLng, state.getScale()) * scale / double(util::tileSize), zoom }; } static TileCoordinate fromScreenCoordinate(const TransformState& state, double zoom, const ScreenCoordinate& screenCoordinate) { |