Skip to content

Commit

Permalink
Server WMS gfi, fix maptips layer scope
Browse files Browse the repository at this point in the history
Fixes #30719
  • Loading branch information
elpaso authored and nyalldawson committed Sep 16, 2022
1 parent 6e50b6d commit dfa8ba0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/services/wms/qgswmsrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,9 @@ namespace QgsWms
{
QDomElement maptipElem = infoDocument.createElement( QStringLiteral( "Attribute" ) );
maptipElem.setAttribute( QStringLiteral( "name" ), QStringLiteral( "maptip" ) );
maptipElem.setAttribute( QStringLiteral( "value" ), QgsExpression::replaceExpressionText( mapTip, &renderContext.expressionContext() ) );
QgsExpressionContext context { renderContext.expressionContext() };
context.appendScope( QgsExpressionContextUtils::layerScope( layer ) );
maptipElem.setAttribute( QStringLiteral( "value" ), QgsExpression::replaceExpressionText( mapTip, &context ) );
featureElement.appendChild( maptipElem );
}

Expand Down

0 comments on commit dfa8ba0

Please sign in to comment.