Class: QgsVectorTileBasicRenderer

The default vector tile renderer implementation.

It has an ordered list of “styles”, each defines a rendering rule.

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.core.QgsVectorTileBasicRenderer

Base classes

QgsVectorTileRenderer

Abstract base class for all vector tile renderer implementations.

class qgis.core.QgsVectorTileBasicRenderer[source]

Bases: QgsVectorTileRenderer

__init__()

Constructs renderer with no styles

__init__(a0: QgsVectorTileBasicRenderer)
Parameters:

a0 (QgsVectorTileBasicRenderer)

setStyle(self, index: int, style: QgsVectorTileBasicRendererStyle)[source]

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])[source]

Sets list of styles of the renderer

Parameters:

styles (Iterable[QgsVectorTileBasicRendererStyle])

static 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, Qt.GlobalColor])

  • polygonStrokeColor (Union[QColor, Qt.GlobalColor])

  • polygonStrokeWidth (float)

  • lineStrokeColor (Union[QColor, Qt.GlobalColor])

  • lineStrokeWidth (float)

  • pointFillColor (Union[QColor, Qt.GlobalColor])

  • pointStrokeColor (Union[QColor, Qt.GlobalColor])

  • pointSize (float)

Return type:

List[QgsVectorTileBasicRendererStyle]

static simpleStyleWithRandomColors() List[QgsVectorTileBasicRendererStyle]

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

Return type:

List[QgsVectorTileBasicRendererStyle]

style(self, index: int) QgsVectorTileBasicRendererStyle[source]

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]