Skip to content

Commit

Permalink
Tiles XYZ fixed scale-dependant styles
Browse files Browse the repository at this point in the history
(cherry picked from commit 742c7b9)
  • Loading branch information
javicasnov authored and nyalldawson committed Nov 21, 2019
1 parent 9bfd06a commit 11bcbc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/TilesXYZ.py
Expand Up @@ -199,7 +199,7 @@ def renderSingleMetatile(self, metatile):
extent = QgsRectangle(*metatile.extent())
threadSpecificSettings.setExtent(self.wgs_to_dest.transformBoundingBox(extent))
threadSpecificSettings.setOutputSize(size)

#Append MapSettings scope in order to update map variables (e.g @map_scale) with new extent data
exp_context = threadSpecificSettings.expressionContext()
exp_context.appendScope(QgsExpressionContextUtils.mapSettingsScope(threadSpecificSettings))
Expand Down Expand Up @@ -270,7 +270,7 @@ def generate(self, writer, parameters, context, feedback):
labeling_engine_settings = self.settingsDictionary[thread].labelingEngineSettings()
labeling_engine_settings.setFlag(QgsLabelingEngineSettings.UsePartialCandidates, False)
self.settingsDictionary[thread].setLabelingEngineSettings(labeling_engine_settings)

# Transfer context scopes to MapSettings
self.settingsDictionary[thread].setExpressionContext(context.expressionContext())

Expand Down

0 comments on commit 11bcbc0

Please sign in to comment.