Class: QgsVectorTileRendererData

Contains decoded features of a single vector tile and any other data necessary for rendering of it.

Added in version 3.14.

class qgis.core.QgsVectorTileRendererData[source]

Bases: object

__init__(id: QgsTileXYZ)

Constructs the object

Parameters:

id (QgsTileXYZ)

__init__(a0: QgsVectorTileRendererData)
Parameters:

a0 (QgsVectorTileRendererData)

fields(self) Dict[str, QgsFields]

Returns per-layer fields

Return type:

Dict[str, QgsFields]

id(self) QgsTileXYZ[source]

Returns coordinates of the tile

Return type:

QgsTileXYZ

layerFeatures(self, layerName: str | None) List[QgsFeature]

Returns list of all features within a single sub-layer

Parameters:

layerName (Optional[str])

Return type:

List[QgsFeature]

layers(self) List[str][source]

Returns list of layer names present in the tile

Return type:

List[str]

renderZoomLevel(self) int[source]

Returns the zoom level corresponding to the target render.

This may differ from the tile’s actual zoom leve when indexed tiles cause replacement of higher zoom level tiles with data from lower zoom level tiles.

Added in version 3.32.

Return type:

int

setFields(self, fields: Dict[str | None, QgsFields])[source]

Sets per-layer fields

Parameters:

fields (Dict[Optional[str], QgsFields])

setRenderZoomLevel(self, level: int)[source]

Sets the zoom level corresponding to the target render.

This may differ from the tile’s actual zoom leve when indexed tiles cause replacement of higher zoom level tiles with data from lower zoom level tiles.

Added in version 3.32.

Parameters:

level (int)

setTilePolygon(self, polygon: QPolygon)[source]

Sets polygon of the tile

Parameters:

polygon (QPolygon)

tilePolygon(self) QPolygon[source]

Returns polygon (made out of four corners of the tile) in screen coordinates calculated from render context

Return type:

QPolygon