Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[quick] Improve map settings flags for canvas
- labeling engine settings from project were not being applied
- enable simplification of geometries (faster map rendering)
- enable partial map updates when incremental rendering is enabled
  (to be able to see how wmts/xyz tiles are being loaded)
  • Loading branch information
wonder-sk committed Feb 12, 2019
1 parent 6fab904 commit 43512d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/quickgui/qgsquickmapcanvasmap.cpp
Expand Up @@ -102,10 +102,17 @@ void QgsQuickMapCanvasMap::refreshMap()
if ( project )
{
expressionContext << QgsExpressionContextUtils::projectScope( project );

mapSettings.setLabelingEngineSettings( project->labelingEngineSettings() );
}

mapSettings.setExpressionContext( expressionContext );

// enables on-the-fly simplification of geometries to spend less time rendering
mapSettings.setFlag( QgsMapSettings::UseRenderingOptimization );
// with incremental rendering - enables updates of partially rendered layers (good for WMTS, XYZ layers)
mapSettings.setFlag( QgsMapSettings::RenderPartialOutput, mIncrementalRendering );

// create the renderer job
Q_ASSERT( !mJob );
mJob = new QgsMapRendererParallelJob( mapSettings );
Expand Down

0 comments on commit 43512d5

Please sign in to comment.