Class: QgsMarkerLineSymbolLayer

Line symbol layer type which draws repeating marker symbols along a line feature.

Class Hierarchy

Inheritance diagram of qgis.core.QgsMarkerLineSymbolLayer

Base classes

QgsTemplatedLineSymbolLayerBase

Base class for templated line symbols, e.g. line symbols which draw markers or hash lines at intervals along the line feature.

QgsLineSymbolLayer

Abstract base class for line symbol layers.

QgsSymbolLayer

Abstract base class for symbol layers.

Methods

rotateMarker

Shall the marker be rotated.

setRotateMarker

Shall the marker be rotated.

Static Methods

create

Creates a new QgsMarkerLineSymbolLayer, using the settings serialized in the properties map (corresponding to the output from QgsMarkerLineSymbolLayer.properties() ).

createFromSld

Creates a new QgsMarkerLineSymbolLayer from an SLD XML DOM element.

class qgis.core.QgsMarkerLineSymbolLayer[source]

Bases: QgsTemplatedLineSymbolLayerBase

__init__(rotateMarker: bool = DEFAULT_MARKERLINE_ROTATE, interval: float = DEFAULT_MARKERLINE_INTERVAL)

Constructor for QgsMarkerLineSymbolLayer. Creates a marker line with a default marker symbol, placed at the specified interval (in millimeters).

The rotateMarker argument specifies whether individual marker symbols should be rotated to match the line segment alignment.

Parameters:
  • rotateMarker (bool = DEFAULT_MARKERLINE_ROTATE)

  • interval (float = DEFAULT_MARKERLINE_INTERVAL)

static create(properties: Dict[str, Any] = {}) QgsSymbolLayer | None[source]

Creates a new QgsMarkerLineSymbolLayer, using the settings serialized in the properties map (corresponding to the output from QgsMarkerLineSymbolLayer.properties() ).

Parameters:

properties (Dict[str, Any] = {})

Return type:

Optional[QgsSymbolLayer]

static createFromSld(element: QDomElement) QgsSymbolLayer | None[source]

Creates a new QgsMarkerLineSymbolLayer from an SLD XML DOM element.

Parameters:

element (QDomElement)

Return type:

Optional[QgsSymbolLayer]

rotateMarker(self) bool[source]

Shall the marker be rotated.

Return type:

bool

Returns:

True if the marker should be rotated.

Deprecated since version 3.40: Use rotateSymbols() instead.

setRotateMarker(self, rotate: bool)[source]

Shall the marker be rotated.

Deprecated since version 3.40: Use setRotateSymbols() instead.

Parameters:

rotate (bool)