Class: QgsVectorTileBasicRenderer

class qgis.core.QgsVectorTileBasicRenderer

Bases: QgsVectorTileRenderer

The default vector tile renderer implementation. It has an ordered list of “styles”, each defines a rendering rule.

New in version 3.14.

QgsVectorTileBasicRenderer() Constructs renderer with no styles

QgsVectorTileBasicRenderer(QgsVectorTileBasicRenderer)

Methods

clone

rtype:

QgsVectorTileBasicRenderer

readXml

param elem:

renderBackground

param context:

renderSelectedFeatures

param selection:

renderTile

param tile:

requiredLayers

param context:

setStyle

Updates style definition at the paricular index of the list (the index must be in interval [0,N-1] otherwise this function does nothing)

setStyles

Sets list of styles of the renderer

simpleStyle

Returns a list of styles to render all layers with the given fill/stroke colors, stroke widths and marker sizes

simpleStyleWithRandomColors

Returns a list of styles to render all layers, using random colors

startRender

param context:

stopRender

param context:

style

Returns style definition at the particular index

styles

Returns list of styles of the renderer

type

rtype:

str

willRenderFeature

param feature:

writeXml

param elem:

clone(self) QgsVectorTileBasicRenderer
Return type:

QgsVectorTileBasicRenderer

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters:
renderBackground(self, context: QgsRenderContext)
Parameters:

context (QgsRenderContext) –

renderSelectedFeatures(self, selection: Iterable[QgsFeature], context: QgsRenderContext)
Parameters:
renderTile(self, tile: QgsVectorTileRendererData, context: QgsRenderContext)
Parameters:
requiredLayers(self, context: QgsRenderContext, tileZoom: int) Set[str]
Parameters:
Return type:

Set[str]

setStyle(self, index: int, style: QgsVectorTileBasicRendererStyle)

Updates style definition at the paricular index of the list (the index must be in interval [0,N-1] otherwise this function does nothing)

Parameters:
setStyles(self, styles: Iterable[QgsVectorTileBasicRendererStyle])

Sets list of styles of the renderer

Parameters:

styles (Iterable[QgsVectorTileBasicRendererStyle]) –

simpleStyle(polygonFillColor: QColor | Qt.GlobalColor, polygonStrokeColor: QColor | Qt.GlobalColor, polygonStrokeWidth: float, lineStrokeColor: QColor | Qt.GlobalColor, lineStrokeWidth: float, pointFillColor: QColor | Qt.GlobalColor, pointStrokeColor: QColor | Qt.GlobalColor, pointSize: float) List[QgsVectorTileBasicRendererStyle]

Returns a list of styles to render all layers with the given fill/stroke colors, stroke widths and marker sizes

Parameters:
  • polygonFillColor (Union[QColor) –

  • polygonStrokeColor (Union[QColor) –

  • polygonStrokeWidth (float) –

  • lineStrokeColor (Union[QColor) –

  • lineStrokeWidth (float) –

  • pointFillColor (Union[QColor) –

  • pointStrokeColor (Union[QColor) –

  • pointSize (float) –

Return type:

List[QgsVectorTileBasicRendererStyle]

simpleStyleWithRandomColors() List[QgsVectorTileBasicRendererStyle]

Returns a list of styles to render all layers, using random colors

Return type:

List[QgsVectorTileBasicRendererStyle]

startRender(self, context: QgsRenderContext, tileZoom: int, tileRange: QgsTileRange)
Parameters:
stopRender(self, context: QgsRenderContext)
Parameters:

context (QgsRenderContext) –

style(self, index: int) QgsVectorTileBasicRendererStyle

Returns style definition at the particular index

Parameters:

index (int) –

Return type:

QgsVectorTileBasicRendererStyle

styles(self) List[QgsVectorTileBasicRendererStyle]

Returns list of styles of the renderer

Return type:

List[QgsVectorTileBasicRendererStyle]

type(self) str
Return type:

str

willRenderFeature(self, feature: QgsFeature, tileZoom: int, layerName: str, context: QgsRenderContext) bool
Parameters:
Return type:

bool

writeXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters: