Class: QgsVectorLayerServerProperties

class qgis.core.QgsVectorLayerServerProperties(layer: QgsVectorLayer = None)

Bases: sip.wrapper

Constructor - Creates a Vector Layer QGIS Server Properties

Parameters

layer (QgsVectorLayer = None) – The vector layer

QgsVectorLayerServerProperties(QgsVectorLayerServerProperties)

Manages QGIS Server properties for a vector layer

Methods

addWmsDimension

Adds a QGIS Server WMS Dimension

readXml

Reads server properties from project file.

removeWmsDimension

Removes a QGIS Server WMS Dimension

wmsDimensionDefaultDisplayLabels

Returns WMS Dimension default display labels

wmsDimensions

Returns the QGIS Server WMS Dimension list.

writeXml

Saves server properties to xml under the layer node

Attributes

DATE

ELEVATION

TIME

staticMetaObject

DATE = 1
ELEVATION = 2
class PredefinedWmsDimensionName

Bases: int

baseClass

alias of qgis._core.QgsVectorLayerServerProperties

TIME = 0
class WmsDimensionInfo(dimName: str, dimFieldName: str, dimEndFieldName: str = '', dimUnits: str = '', dimUnitSymbol: str = '', dimDefaultDisplayType: int = QgsVectorLayerServerProperties.WmsDimensionInfo.AllValues, dimReferenceValue: Any = None)

Bases: sip.wrapper

Constructor for WmsDimensionInfo.

QgsVectorLayerServerProperties.WmsDimensionInfo(QgsVectorLayerServerProperties.WmsDimensionInfo)

Parameters
  • dimName (str) –

  • dimFieldName (str) –

  • dimEndFieldName (str = '') –

  • dimUnits (str = '') –

  • dimUnitSymbol (str = '') –

  • dimDefaultDisplayType (int = QgsVectorLayerServerProperties.WmsDimensionInfo.AllValues) –

  • dimReferenceValue (Any = None) –

AllValues = 0
class DefaultDisplay

Bases: int

MaxValue = 2
MinValue = 1
ReferenceValue = 3
defaultDisplayType
endFieldName
fieldName
name
referenceValue
unitSymbol
units
addWmsDimension(self, wmsDimInfo: QgsVectorLayerServerProperties.WmsDimensionInfo)bool

Adds a QGIS Server WMS Dimension

Parameters

wmsDimInfo (QgsVectorLayerServerProperties.WmsDimensionInfo) – QGIS Server WMS Dimension object with, name, field, etc

Return type

bool

Returns

True if QGIS Server WMS Dimension has been successfully added

New in version 3.10.

readXml(self, layer_node: QDomNode)

Reads server properties from project file.

New in version 3.10.

Parameters

layer_node (QDomNode) –

removeWmsDimension(self, wmsDimName: str)bool

Removes a QGIS Server WMS Dimension

Return type

bool

Returns

True if QGIS Server WMS Dimension was found and successfully removed

New in version 3.10.

Parameters

wmsDimName (str) –

staticMetaObject = <PyQt5.QtCore.QMetaObject object>
wmsDimensionDefaultDisplayLabels()Dict[int, str]

Returns WMS Dimension default display labels

New in version 3.10.

Return type

Dict[int, str]

wmsDimensions(self)List[QgsVectorLayerServerProperties.WmsDimensionInfo]

Returns the QGIS Server WMS Dimension list.

New in version 3.10.

Return type

List[QgsVectorLayerServerProperties.WmsDimensionInfo]

writeXml(self, layer_node: QDomNode, document: QDomDocument)

Saves server properties to xml under the layer node

New in version 3.10.

Parameters
  • layer_node (QDomNode) –

  • document (QDomDocument) –