Class: QgsSnapIndicator

Shows a snapping marker on map canvas for the current snapping match.

class qgis.gui.QgsSnapIndicator[source]

Bases: object

__init__(canvas: QgsMapCanvas | None)

Constructs an indicator for the given map canvas

Parameters:

canvas (Optional[QgsMapCanvas])

isVisible(self) bool[source]

Returns whether the snapping indicator is visible

Return type:

bool

match(self) QgsPointLocator.Match[source]

Returns currently displayed snapping match

Return type:

QgsPointLocator.Match

setMatch(self, match: QgsPointLocator.Match)[source]

Sets snapping match that should be displayed in map canvas. Invalid match hides the indicator

Parameters:

match (QgsPointLocator.Match)

setVisible(self, visible: bool = True)[source]

Sets whether the snapping indicator is visible

Parameters:

visible (bool = True)