Class: QgsCoordinateBoundsPreviewMapWidget

A widget for showing the bounds of a rectangular region on an interactive map.

Added in version 3.8.1.

QgsCoordinateBoundsPreviewMapWidget

QgsCoordinateBoundsPreviewMapWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsCoordinateBoundsPreviewMapWidget

Base classes

QgsMapCanvas

Map canvas is a class for displaying all GIS data types on a canvas.

QGraphicsView

QAbstractScrollArea

QFrame

QWidget

QObject

QPaintDevice

QgsExpressionContextGenerator

Abstract interface for generating an expression context.

class qgis.gui.QgsCoordinateBoundsPreviewMapWidget[source]

Bases: QgsMapCanvas

__init__(parent: QWidget | None = None)

Constructor for QgsCoordinateBoundsPreviewMapWidget.

Parameters:

parent (Optional[QWidget] = None)

canvasRect(self) QgsRectangle[source]

Returns the current canvas bounds rectangle shown in the map.

See also

setCanvasRect()

Return type:

QgsRectangle

setCanvasRect(self, rect: QgsRectangle)[source]

Sets the canvas bounds rectangle for the bounds overview map.

Must be in EPSG:4326 coordinate reference system.

See also

canvasRect()

Parameters:

rect (QgsRectangle)

setPreviewRect(self, rect: QgsRectangle)[source]

Sets the “preview” rectangle for the bounds overview map. Must be in EPSG:4326 coordinate reference system.

Parameters:

rect (QgsRectangle)