Class: QgsMapCanvasUtils¶
-
class
qgis.gui.
QgsMapCanvasUtils
¶ Bases:
sip.wrapper
Utility functions for working with
QgsMapCanvas
widgets.Methods
Flashes features from the specified
layer
which match the givenfilter
expression string with a mapcanvas
.Zooms a map
canvas
to features from the specifiedlayer
which match the givenfilter
expression string.-
flashMatchingFeatures
(canvas: QgsMapCanvas, layer: QgsVectorLayer, filter: str) → int¶ Flashes features from the specified
layer
which match the givenfilter
expression string with a mapcanvas
.The total count of matching features will be returned.
- Parameters
canvas (QgsMapCanvas) –
layer (QgsVectorLayer) –
filter (str) –
- Return type
int
-
zoomToMatchingFeatures
(canvas: QgsMapCanvas, layer: QgsVectorLayer, filter: str) → int¶ Zooms a map
canvas
to features from the specifiedlayer
which match the givenfilter
expression string.The total count of matching features will be returned.
- Parameters
canvas (QgsMapCanvas) –
layer (QgsVectorLayer) –
filter (str) –
- Return type
int
-