diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-19 11:47:26 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-20 13:54:19 -0700 |
commit | 8baa804a44927fe23b4fed3cb07eb6db9a78f2e8 (patch) | |
tree | 2338eae730607f23f5b6b2f64d8196dfa27ad592 /src/mbgl/util/geo.cpp | |
parent | 342475efb748558b90437672fba333b3f9af0adc (diff) | |
download | qtlocation-mapboxgl-8baa804a44927fe23b4fed3cb07eb6db9a78f2e8.tar.gz |
[core] Fix swapped lat/lon in geo.cpp
Diffstat (limited to 'src/mbgl/util/geo.cpp')
-rw-r--r-- | src/mbgl/util/geo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/geo.cpp b/src/mbgl/util/geo.cpp index b08b10d1e6..21a591cb43 100644 --- a/src/mbgl/util/geo.cpp +++ b/src/mbgl/util/geo.cpp @@ -6,9 +6,9 @@ namespace mbgl { LatLng::LatLng(const TileID& id) { - latitude = id.x / std::pow(2.0, id.z) * 360.0 - 180; + longitude = id.x / std::pow(2.0, id.z) * 360.0 - 180; const double n = M_PI - 2.0 * M_PI * id.y / std::pow(2.0, id.z); - longitude = 180.0 / M_PI * std::atan(0.5 * (std::exp(n) - std::exp(-n))); + latitude = 180.0 / M_PI * std::atan(0.5 * (std::exp(n) - std::exp(-n))); } LatLngBounds::LatLngBounds(const TileID& id) |