Class: QgsVectorTileBasicLabelingStyle¶
- class qgis.core.QgsVectorTileBasicLabelingStyle¶
Bases:
sip.wrapper
Configuration of a single style within
QgsVectorTileBasicLabeling
New in version 3.14:
Methods
Returns filter expression (empty filter means that all features match)
Returns type of the geometry that will be used (point / line / polygon)
Returns whether the style is active at given zoom level (also checks "enabled" flag)
Returns whether this style is enabled (used for rendering)
Returns labeling configuration of this style
Returns name of the sub-layer to render (empty layer means that all layers match)
Returns the maximum zoom level index (negative number means no limit).
Returns the minimum zoom level index (negative number means no limit).
Reads object content from given DOM element
Sets whether this style is enabled (used for rendering)
Sets filter expression (empty filter means that all features match)
Sets type of the geometry that will be used (point / line / polygon)
Sets labeling configuration of this style
Sets name of the sub-layer to render (empty layer means that all layers match)
Sets maximum zoom level index (negative number means no limit).
Sets minimum zoom level index (negative number means no limit).
Sets human readable name of this style
Returns human readable name of this style
Writes object content to given DOM element
- filterExpression(self) str ¶
Returns filter expression (empty filter means that all features match)
- Return type:
str
- geometryType(self) Qgis.GeometryType ¶
Returns type of the geometry that will be used (point / line / polygon)
- Return type:
- isActive(self, zoomLevel: int) bool ¶
Returns whether the style is active at given zoom level (also checks “enabled” flag)
- Parameters:
zoomLevel (int) –
- Return type:
bool
- isEnabled(self) bool ¶
Returns whether this style is enabled (used for rendering)
- Return type:
bool
- labelSettings(self) QgsPalLayerSettings ¶
Returns labeling configuration of this style
- Return type:
- layerName(self) str ¶
Returns name of the sub-layer to render (empty layer means that all layers match)
- Return type:
str
- maxZoomLevel(self) int ¶
Returns the maximum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is less than or equal to the maximum zoom.
Warning
This differs from the handling of the max zoom as defined in the MapBox Style Specifications, where the style is rendered only if the zoom level is less than the maximum zoom.
See also
See also
- Return type:
int
- minZoomLevel(self) int ¶
Returns the minimum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is greater than or equal to the this level.
See also
See also
- Return type:
int
- readXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
Reads object content from given DOM element
- Parameters:
elem (QDomElement) –
context (QgsReadWriteContext) –
- setEnabled(self, enabled: bool)¶
Sets whether this style is enabled (used for rendering)
- Parameters:
enabled (bool) –
- setFilterExpression(self, expr: str)¶
Sets filter expression (empty filter means that all features match)
- Parameters:
expr (str) –
- setGeometryType(self, geomType: Qgis.GeometryType)¶
Sets type of the geometry that will be used (point / line / polygon)
- Parameters:
geomType (Qgis.GeometryType) –
- setLabelSettings(self, settings: QgsPalLayerSettings)¶
Sets labeling configuration of this style
- Parameters:
settings (QgsPalLayerSettings) –
- setLayerName(self, name: str)¶
Sets name of the sub-layer to render (empty layer means that all layers match)
- Parameters:
name (str) –
- setMaxZoomLevel(self, maxZoom: int)¶
Sets maximum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is less than or equal to
maxZoom
.Warning
This differs from the handling of the max zoom as defined in the MapBox Style Specifications, where the style is rendered only if the zoom level is less than the maximum zoom.
See also
See also
- Parameters:
maxZoom (int) –
- setMinZoomLevel(self, minZoom: int)¶
Sets minimum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is greater than or equal to
minZoom
.See also
See also
- Parameters:
minZoom (int) –
- setStyleName(self, name: str)¶
Sets human readable name of this style
- Parameters:
name (str) –
- styleName(self) str ¶
Returns human readable name of this style
- Return type:
str
- writeXml(self, elem: QDomElement, context: QgsReadWriteContext)¶
Writes object content to given DOM element
- Parameters:
elem (QDomElement) –
context (QgsReadWriteContext) –