diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-04-17 13:11:57 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-04-18 14:15:30 +0000 |
commit | fce2ba1910a6cac05d8af39fe6114998490ed28f (patch) | |
tree | 04f75490bb98a3aee363c57281cf1feb1a3c66db /src/positioning | |
parent | 75869bc717f1e0e1dbd0302d4ea81f671b9f2279 (diff) | |
download | qtlocation-fce2ba1910a6cac05d8af39fe6114998490ed28f.tar.gz |
Remove dead code
Removing a method introduced in 5.9 and apparently never used.
Change-Id: Ia1b8bf47630ca84ec2debb12e2e475efc6773ad9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/positioning')
-rw-r--r-- | src/positioning/qwebmercator.cpp | 24 | ||||
-rw-r--r-- | src/positioning/qwebmercator_p.h | 1 |
2 files changed, 0 insertions, 25 deletions
diff --git a/src/positioning/qwebmercator.cpp b/src/positioning/qwebmercator.cpp index b8abac2b..0aad4100 100644 --- a/src/positioning/qwebmercator.cpp +++ b/src/positioning/qwebmercator.cpp @@ -100,30 +100,6 @@ QGeoCoordinate QWebMercator::mercatorToCoord(const QDoubleVector2D &mercator) return QGeoCoordinate(lat, lng, 0.0); } -QGeoCoordinate QWebMercator::mercatorToCoordClamped(const QDoubleVector2D &mercator) -{ - double fx = mercator.x(); - double fy = mercator.y(); - - if (fy < 0.0) - fy = 0.0; - else if (fy > 1.0) - fy = 1.0; - - double lat = qRadiansToDegrees(2.0 * std::atan(std::exp(M_PI * (1.0 - 2.0 * fy))) - (M_PI / 2.0)); - - double lng; - if (fx >= 0) { - lng = realmod(fx, 1.0); - } else { - lng = realmod(1.0 - realmod(-1.0 * fx, 1.0), 1.0); - } - - lng = lng * 360.0 - 180.0; - - return QGeoCoordinate(lat, lng, 0.0); -} - QGeoCoordinate QWebMercator::coordinateInterpolation(const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress) { QDoubleVector2D s = QWebMercator::coordToMercator(from); diff --git a/src/positioning/qwebmercator_p.h b/src/positioning/qwebmercator_p.h index 52a5e040..109f0730 100644 --- a/src/positioning/qwebmercator_p.h +++ b/src/positioning/qwebmercator_p.h @@ -64,7 +64,6 @@ class Q_POSITIONING_PRIVATE_EXPORT QWebMercator public: static QDoubleVector2D coordToMercator(const QGeoCoordinate &coord); static QGeoCoordinate mercatorToCoord(const QDoubleVector2D &mercator); - static QGeoCoordinate mercatorToCoordClamped(const QDoubleVector2D &mercator); static QGeoCoordinate coordinateInterpolation(const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress); private: |