Class: QgsVectorTileBasicRenderer¶
-
class
qgis.core.
QgsVectorTileBasicRenderer
¶ Bases:
QgsVectorTileRenderer
Constructs renderer with no styles
QgsVectorTileBasicRenderer(
QgsVectorTileBasicRenderer
)The default vector tile renderer implementation. It has an ordered list of “styles”, each defines a rendering rule.
Methods
- rtype
QgsVectorTileBasicRenderer
- param elem
- param tile
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) –
-
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: 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) → 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) –