Class: QgsSnapIndicator

class qgis.gui.QgsSnapIndicator(canvas: QgsMapCanvas)

Bases: sip.wrapper

Constructs an indicator for the given map canvas

Class that shows snapping marker on map canvas for the current snapping match.

New in version 3.0:

Methods

isVisible

Returns whether the snapping indicator is visible

match

Returns currently displayed snapping match

setMatch

Sets snapping match that should be displayed in map canvas.

setVisible

Sets whether the snapping indicator is visible

isVisible(self) bool

Returns whether the snapping indicator is visible

Return type

bool

match(self) QgsPointLocator.Match

Returns currently displayed snapping match

Return type

QgsPointLocator.Match

setMatch(self, match: QgsPointLocator.Match)

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

Parameters

match (QgsPointLocator.Match) –

setVisible(self, visible: bool = True)

Sets whether the snapping indicator is visible

Parameters

visible (bool = True) –