Class: QgsMapBoxGlStyleRasterSource

Encapsulates a MapBox GL style raster source.

Warning

This is private API only, and may change in future QGIS versions

Added in version 3.28.

Class Hierarchy

Inheritance diagram of qgis.core.QgsMapBoxGlStyleRasterSource

Base classes

QgsMapBoxGlStyleAbstractSource

Abstract base class for MapBox GL style sources.

Methods

attribution

Returns the source's attribution text.

maximumZoom

Returns the maximum tile zoom for which tiles are available.

minimumZoom

Returns the minimum tile zoom for which tiles are available.

tileSize

Returns the associated tile size.

tiles

Returns the list of tile sources.

toRasterLayer

Returns a new raster layer representing the raster source, or None if the source cannot be represented as a raster layer.

class qgis.core.QgsMapBoxGlStyleRasterSource[source]

Bases: QgsMapBoxGlStyleAbstractSource

__init__(name: str | None)

Constructor for QgsMapBoxGlStyleRasterSource.

Parameters:

name (Optional[str])

__init__(a0: QgsMapBoxGlStyleRasterSource)
Parameters:

a0 (QgsMapBoxGlStyleRasterSource)

attribution(self) str[source]

Returns the source’s attribution text.

Return type:

str

maximumZoom(self) int[source]

Returns the maximum tile zoom for which tiles are available.

See also

minimumZoom()

Return type:

int

minimumZoom(self) int[source]

Returns the minimum tile zoom for which tiles are available.

See also

maximumZoom()

Return type:

int

tileSize(self) int[source]

Returns the associated tile size.

Return type:

int

tiles(self) List[str][source]

Returns the list of tile sources.

Return type:

List[str]

toRasterLayer(self) QgsRasterLayer | None[source]

Returns a new raster layer representing the raster source, or None if the source cannot be represented as a raster layer.

The caller takes ownership of the returned layer.

Return type:

Optional[QgsRasterLayer]