mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-02 00:02:12 -05:00
Added @zoom_level variable for data-defined styling
This commit is contained in:
parent
1f554621b2
commit
a3807cf2a1
@ -113,6 +113,11 @@ bool QgsVectorTileLayerRenderer::render()
|
||||
if ( ctx.renderingStopped() )
|
||||
return false;
|
||||
|
||||
// add @zoom_level variable which can be used in styling
|
||||
QgsExpressionContextScope *scope = new QgsExpressionContextScope( QObject::tr( "Tiles" ) ); // will be deleted by popper
|
||||
scope->setVariable( "zoom_level", mTileZoom, true );
|
||||
QgsExpressionContextScopePopper popper( ctx.expressionContext(), scope );
|
||||
|
||||
mRenderer->startRender( *renderContext(), mTileZoom, mTileRange );
|
||||
|
||||
QMap<QString, QSet<QString> > requiredFields = mRenderer->usedAttributes( ctx );
|
||||
|
Loading…
x
Reference in New Issue
Block a user