summaryrefslogtreecommitdiff
path: root/src/positioning
diff options
context:
space:
mode:
Diffstat (limited to 'src/positioning')
-rw-r--r--src/positioning/qgeopolygon.cpp1
-rw-r--r--src/positioning/qlocationutils_p.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/positioning/qgeopolygon.cpp b/src/positioning/qgeopolygon.cpp
index 301759df..7d8a0ce0 100644
--- a/src/positioning/qgeopolygon.cpp
+++ b/src/positioning/qgeopolygon.cpp
@@ -673,6 +673,7 @@ QGeoShapePrivate *QGeoPolygonPrivateEager::clone() const
void QGeoPolygonPrivateEager::translate(double degreesLatitude, double degreesLongitude)
{
translatePoly(m_path, m_holesList, m_bbox, degreesLatitude, degreesLongitude, m_maxLati, m_minLati);
+ m_leftBoundWrapped = QWebMercator::coordToMercator(m_bbox.topLeft()).x();
m_clipperDirty = true;
}
diff --git a/src/positioning/qlocationutils_p.h b/src/positioning/qlocationutils_p.h
index e2d739e7..563db200 100644
--- a/src/positioning/qlocationutils_p.h
+++ b/src/positioning/qlocationutils_p.h
@@ -258,6 +258,13 @@ public:
return wrapLong(centerLongitude - leftOffset);
}
+ inline static void split_double(double input, float *hipart, float *lopart)
+ {
+ *hipart = (float) input;
+ double delta = input - ((double) *hipart);
+ *lopart = (float) delta;
+ }
+
static qreal metersPerPixel(qreal zoomLevel, const QGeoCoordinate &coordinate)
{
const qreal metersPerTile = earthMeanCircumference() * std::cos(radians(coordinate.latitude())) / std::pow(2, zoomLevel);