Skip to content
Permalink
Browse files

[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 9, 2019
1 parent 6fab904 commit 43512d561a314497d90a9407e9232c09d1a48191
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/quickgui/qgsquickmapcanvasmap.cpp
@@ -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 );

0 comments on commit 43512d5

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