Class: QgsMapBoxGlStyleAbstractSource

Abstract base class for MapBox GL style sources.

Warning

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

Added in version 3.28.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: setFromJson(), type()

Class Hierarchy

Inheritance diagram of qgis.core.QgsMapBoxGlStyleAbstractSource

Subclasses

QgsMapBoxGlStyleRasterSource

Encapsulates a MapBox GL style raster source.

Abstract Methods

setFromJson

Sets the source's state from a json map.

type

Returns the source type.

Methods

name

Returns the source's name.

class qgis.core.QgsMapBoxGlStyleAbstractSource[source]

Bases: object

__init__(name: str | None)

Constructor for QgsMapBoxGlStyleAbstractSource.

Parameters:

name (Optional[str])

__init__(a0: QgsMapBoxGlStyleAbstractSource)
Parameters:

a0 (QgsMapBoxGlStyleAbstractSource)

name(self) str[source]

Returns the source’s name.

Return type:

str

abstract setFromJson(self, json: Dict[str, Any], context: QgsMapBoxGlStyleConversionContext | None) bool[source]

Sets the source’s state from a json map.

Parameters:
Return type:

bool

abstract type(self) Qgis.MapBoxGlStyleSourceType[source]

Returns the source type.

Return type:

Qgis.MapBoxGlStyleSourceType