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
- rtype:
QgsVectorTileBasicRenderer
- param elem:
- param tile:
- param context:
Updates style definition at the paricular index of the list (the index must be in interval [0,N-1] otherwise this function does nothing)
Sets list of styles of the renderer
Returns a list of styles to render all layers with the given fill/stroke colors, stroke widths and marker sizes
Returns a list of styles to render all layers, using random colors
- param context:
- param context:
Returns style definition at the particular index
Returns list of styles of the renderer
- rtype:
str
- param elem:
- clone(self) QgsVectorTileBasicRenderer ¶
- Return type:
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement) –
context (QgsReadWriteContext) –
- renderTile(self, tile: QgsVectorTileRendererData, context: QgsRenderContext)¶
- Parameters:
tile (QgsVectorTileRendererData) –
context (QgsRenderContext) –
- requiredLayers(self, context: QgsRenderContext, tileZoom: int) Set[str] ¶
- Parameters:
context (QgsRenderContext) –
tileZoom (int) –
- 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:
index (int) –
style (QgsVectorTileBasicRendererStyle) –
- 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:
- simpleStyleWithRandomColors() List[QgsVectorTileBasicRendererStyle] ¶
Returns a list of styles to render all layers, using random colors
- Return type:
- startRender(self, context: QgsRenderContext, tileZoom: int, tileRange: QgsTileRange)¶
- Parameters:
context (QgsRenderContext) –
tileZoom (int) –
tileRange (QgsTileRange) –
- stopRender(self, context: QgsRenderContext)¶
- Parameters:
context (QgsRenderContext) –
- style(self, index: int) QgsVectorTileBasicRendererStyle ¶
Returns style definition at the particular index
- Parameters:
index (int) –
- Return type:
- styles(self) List[QgsVectorTileBasicRendererStyle] ¶
Returns list of styles of the renderer
- Return type:
- type(self) str ¶
- Return type:
str
- writeXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement) –
context (QgsReadWriteContext) –