Class: QgsMapBoxGlStyleRasterSource

class qgis.core.QgsMapBoxGlStyleRasterSource

Bases: QgsMapBoxGlStyleAbstractSource

Encapsulates a MapBox GL style raster source.

Warning

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

New in version 3.28.

QgsMapBoxGlStyleRasterSource(name: str) Constructor for QgsMapBoxGlStyleRasterSource.

QgsMapBoxGlStyleRasterSource(QgsMapBoxGlStyleRasterSource)

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.

setFromJson

param json

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.

type

rtype

Qgis.MapBoxGlStyleSourceType

attribution(self) str

Returns the source’s attribution text.

Return type

str

maximumZoom(self) int

Returns the maximum tile zoom for which tiles are available.

See also

minimumZoom()

Return type

int

minimumZoom(self) int

Returns the minimum tile zoom for which tiles are available.

See also

maximumZoom()

Return type

int

setFromJson(self, json: Dict[str, Any], context: QgsMapBoxGlStyleConversionContext) bool
Parameters
Return type

bool

tileSize(self) int

Returns the associated tile size.

Return type

int

tiles(self) List[str]

Returns the list of tile sources.

Return type

List[str]

toRasterLayer(self) QgsRasterLayer

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

QgsRasterLayer

type(self) Qgis.MapBoxGlStyleSourceType
Return type

Qgis.MapBoxGlStyleSourceType