Class: QgsMapCanvasUtils

class qgis.gui.QgsMapCanvasUtils

Bases: sip.wrapper

Utility functions for working with QgsMapCanvas widgets.

New in version 3.14:

Methods

flashMatchingFeatures

Flashes features from the specified layer which match the given filter expression string with a map canvas.

zoomToMatchingFeatures

Zooms a map canvas to features from the specified layer which match the given filter expression string.

flashMatchingFeatures(canvas: QgsMapCanvas, layer: QgsVectorLayer, filter: str) int

Flashes features from the specified layer which match the given filter expression string with a map canvas.

The total count of matching features will be returned.

Parameters
Return type

int

zoomToMatchingFeatures(canvas: QgsMapCanvas, layer: QgsVectorLayer, filter: str) int

Zooms a map canvas to features from the specified layer which match the given filter expression string.

The total count of matching features will be returned.

Parameters
Return type

int