diff options
Diffstat (limited to 'src/location/declarativemaps/qdeclarativecirclemapitem.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativecirclemapitem.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp index 68e61ee5..e8b73ae5 100644 --- a/src/location/declarativemaps/qdeclarativecirclemapitem.cpp +++ b/src/location/declarativemaps/qdeclarativecirclemapitem.cpp @@ -501,7 +501,7 @@ void QDeclarativeCircleMapItem::updatePolish() QList<QDoubleVector2D> circlePath = circlePath_; int pathCount = circlePath.size(); - bool preserve = preserveCircleGeometry(circlePath, circle_.center(), circle_.radius()); + bool preserve = preserveCircleGeometry(circlePath, circle_.center(), circle_.radius(), p); // using leftBound_ instead of the analytically calculated circle_.boundingGeoRectangle().topLeft()); // to fix QTBUG-62154 geometry_.setPreserveGeometry(true, leftBound_); // to set the geoLeftBound_ @@ -623,11 +623,11 @@ void QDeclarativeCircleMapItem::geometryChanged(const QRectF &newGeometry, const } bool QDeclarativeCircleMapItem::preserveCircleGeometry (QList<QDoubleVector2D> &path, - const QGeoCoordinate ¢er, qreal distance) + const QGeoCoordinate ¢er, qreal distance, const QGeoProjectionWebMercator &p) { // if circle crosses north/south pole, then don't preserve circular shape, if ( crossEarthPole(center, distance)) { - updateCirclePathForRendering(path, center, distance); + updateCirclePathForRendering(path, center, distance, p); return false; } return true; @@ -653,9 +653,8 @@ bool QDeclarativeCircleMapItem::preserveCircleGeometry (QList<QDoubleVector2D> & */ void QDeclarativeCircleMapItem::updateCirclePathForRendering(QList<QDoubleVector2D> &path, const QGeoCoordinate ¢er, - qreal distance) + qreal distance, const QGeoProjectionWebMercator &p) { - const QGeoProjectionWebMercator &p = static_cast<const QGeoProjectionWebMercator&>(map()->geoProjection()); const qreal poleLat = 90; const qreal distanceToNorthPole = center.distanceTo(QGeoCoordinate(poleLat, 0)); const qreal distanceToSouthPole = center.distanceTo(QGeoCoordinate(-poleLat, 0)); |