Skip to content
Permalink
Browse files
Update for changes in API
  • Loading branch information
nyalldawson committed Nov 7, 2017
1 parent c6d939f commit 90d6a2d0895e05b9ec549e44bd5f3b7c0011c793
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1034,7 +1034,7 @@ QgsExpressionContext QgsLayoutItemMap::createExpressionContext() const
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent" ), QVariant::fromValue( QgsGeometry::fromRect( currentExtent ) ), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent_width" ), currentExtent.width(), true ) );
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent_height" ), currentExtent.height(), true ) );
QgsGeometry centerPoint = QgsGeometry::fromPoint( currentExtent.center() );
QgsGeometry centerPoint = QgsGeometry::fromPointXY( currentExtent.center() );
scope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "map_extent_center" ), QVariant::fromValue( centerPoint ), true ) );

QgsCoordinateReferenceSystem mapCrs = crs();

0 comments on commit 90d6a2d

Please sign in to comment.