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.
Added in version 3.14.
QgsVectorTileBasicRenderer() Constructs renderer with no styles
QgsVectorTileBasicRenderer(
QgsVectorTileBasicRenderer
)Methods
- rtype:
QgsVectorTileBasicRenderer
- param elem:
- param context:
- param selection:
- 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 feature:
- param elem:
- clone(self) QgsVectorTileBasicRenderer ¶
- Return type:
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement)
context (QgsReadWriteContext)
- renderBackground(self, context: QgsRenderContext)¶
- Parameters:
context (QgsRenderContext)
- renderSelectedFeatures(self, selection: Iterable[QgsFeature], context: QgsRenderContext)¶
- Parameters:
selection (Iterable[QgsFeature])
context (QgsRenderContext)
- 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 | QGradient, polygonStrokeColor: QColor | Qt.GlobalColor | QGradient, polygonStrokeWidth: float, lineStrokeColor: QColor | Qt.GlobalColor | QGradient, lineStrokeWidth: float, pointFillColor: QColor | Qt.GlobalColor | QGradient, pointStrokeColor: QColor | Qt.GlobalColor | QGradient, 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
- willRenderFeature(self, feature: QgsFeature, tileZoom: int, layerName: str, context: QgsRenderContext) bool ¶
- Parameters:
feature (QgsFeature)
tileZoom (int)
layerName (str)
context (QgsRenderContext)
- Return type:
bool
- writeXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
- Parameters:
elem (QDomElement)
context (QgsReadWriteContext)