Class: QgsAnnotationMarkerItem

An annotation item which renders a marker symbol at a point location.

Added in version 3.16.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsAnnotationMarkerItem

Base classes

QgsAnnotationItem

Abstract base class for annotation items which are drawn with QgsAnnotationLayers.

Constructor

__init__

Abstract Methods

clone

Methods

geometry

Returns the point geometry of the marker.

setGeometry

Sets the point geometry location of the marker.

setSymbol

Sets the symbol used to render the marker item.

symbol

Returns the symbol used to render the marker item.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsAnnotationMarkerItem. See the FAQ for more details.

transientEditResultsV2

Static Methods

create

Creates a new marker annotation item.

class qgis.core.QgsAnnotationMarkerItem[source]

Bases: QgsAnnotationItem

__init__(point: QgsPoint)

Constructor for QgsAnnotationMarkerItem, at the specified point.

Parameters:

point (QgsPoint)

abstract clone(self) → QgsAnnotationMarkerItem | None[source]
Return type:

QgsAnnotationMarkerItem|None

static create() → QgsAnnotationMarkerItem | None

Creates a new marker annotation item.

Return type:

QgsAnnotationMarkerItem|None

geometry(self) → QgsPointXY[source]

Returns the point geometry of the marker.

The coordinate reference system for the point will be the parent layer’s QgsAnnotationLayer.crs().

See also

setGeometry()

Return type:

QgsPointXY

setGeometry(self, geometry: QgsPoint)[source]

Sets the point geometry location of the marker.

The coordinate reference system for the point will be the parent layer’s QgsAnnotationLayer.crs().

See also

geometry()

Parameters:

geometry (QgsPoint)

setSymbol(self, symbol: QgsMarkerSymbol | None)[source]

Sets the symbol used to render the marker item.

The item takes ownership of the symbol.

See also

symbol()

Parameters:

symbol (QgsMarkerSymbol|None)

symbol(self) → QgsMarkerSymbol | None[source]

Returns the symbol used to render the marker item.

See also

setSymbol()

Return type:

QgsMarkerSymbol|None

virtual transientEditResultsV2(self, operation: QgsAbstractAnnotationItemEditOperation | None, context: QgsAnnotationItemEditContext) → QgsAnnotationItemEditOperationTransientResults | None[source]
Parameters:
Return type:

QgsAnnotationItemEditOperationTransientResults|None