Skip to content
Permalink
Browse files

Update layout map to use transform context

  • Loading branch information
nyalldawson committed Nov 28, 2017
1 parent 4838e55 commit 95a2ac083c83f7d7d2dde24ad1bb143256309a62
@@ -1498,7 +1498,7 @@ QPointF QgsLayoutItemMap::layoutMapPosForItem( const QgsAnnotation *annotation )
{
//need to reproject
// todo datum nyall set context
QgsCoordinateTransform t( annotationCrs, crs() );
QgsCoordinateTransform t( annotationCrs, crs(), mLayout->project() );
double z = 0.0;
try
{
@@ -2294,7 +2294,7 @@ int QgsLayoutItemMapGrid::crsGridParams( QgsRectangle &crsRect, QgsCoordinateTra

try
{
QgsCoordinateTransform tr( mMap->crs(), mCRS );
QgsCoordinateTransform tr( mMap->crs(), mCRS, mLayout->project() );
QPolygonF mapPolygon = mMap->transformedMapPolygon();
QRectF mbr = mapPolygon.boundingRect();
QgsRectangle mapBoundingRect( mbr.left(), mbr.bottom(), mbr.right(), mbr.top() );
@@ -70,7 +70,7 @@ void QgsLayoutItemMapOverview::draw( QPainter *painter )

// reproject extent
QgsCoordinateTransform ct( overviewFrameMap->crs(),
mMap->crs() );
mMap->crs(), mLayout->project() );
g = g.densifyByCount( 20 );
try
{

0 comments on commit 95a2ac0

Please sign in to comment.
You can’t perform that action at this time.