Class: QgsLayoutItemMapOverview¶
An individual overview which is drawn above the map content in a
QgsLayoutItemMap
, and shows the extent of another
QgsLayoutItemMap
.
See also
Class Hierarchy¶
Base classes¶
An item which is drawn inside a |
|
A base class for objects which belong to a layout. |
|
Abstract interface for generating an expression context. |
Methods
Returns a vector layer to render as part of the |
|
Retrieves the blending mode used for drawing the overview. |
|
Returns whether the extent of the map is forced to center on the overview. |
|
Reconnects signals for overview map, so that overview correctly follows changes to source map's extent. |
|
Returns the fill symbol used for drawing the overview extent. |
|
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map. |
|
Returns the source map to show the overview extent of. |
|
Handles recentering of the map and redrawing of the map's overview |
|
Sets the blending mode used for drawing the overview. |
|
Sets whether the extent of the map is forced to center on the overview |
|
Sets the fill symbol used for drawing the overview extent. |
|
Sets whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map. |
|
Sets the map to show the overview extent of. |
- class qgis.core.QgsLayoutItemMapOverview[source]¶
Bases:
QgsLayoutItemMapItem
- __init__(name: str | None, map: QgsLayoutItemMap | None)
Constructor for QgsLayoutItemMapOverview.
- Parameters:
name (Optional[str]) – friendly display name for overview
map (Optional[QgsLayoutItemMap]) –
QgsLayoutItemMap
the overview is attached to
- asMapLayer(self) QgsVectorLayer | None [source]¶
Returns a vector layer to render as part of the
QgsLayoutItemMap
render, containing a feature representing the overview extent (and with an appropriate renderer set matching the overview’sframeSymbol()
).Ownership of the layer remain with the overview item.
Added in version 3.6.
- Return type:
Optional[QgsVectorLayer]
- blendMode(self) QPainter.CompositionMode [source]¶
Retrieves the blending mode used for drawing the overview.
See also
- Return type:
QPainter.CompositionMode
- centered(self) bool [source]¶
Returns whether the extent of the map is forced to center on the overview.
See also
- Return type:
bool
- connectSignals(self)[source]¶
Reconnects signals for overview map, so that overview correctly follows changes to source map’s extent.
- frameSymbol(self) QgsFillSymbol | None [source]¶
Returns the fill symbol used for drawing the overview extent.
See also
- Return type:
Optional[QgsFillSymbol]
- inverted(self) bool [source]¶
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside the extent of the overview map.
See also
- Return type:
bool
- linkedMap(self) QgsLayoutItemMap | None [source]¶
Returns the source map to show the overview extent of.
See also
- Return type:
Optional[QgsLayoutItemMap]
- overviewExtentChanged(self)[source]¶
Handles recentering of the map and redrawing of the map’s overview
- setBlendMode(self, mode: QPainter.CompositionMode)[source]¶
Sets the blending
mode
used for drawing the overview.See also
- Parameters:
mode (QPainter.CompositionMode)
- setCentered(self, centered: bool)[source]¶
Sets whether the extent of the map is forced to center on the overview
See also
- Parameters:
centered (bool)
- setFrameSymbol(self, symbol: QgsFillSymbol | None)[source]¶
Sets the fill
symbol
used for drawing the overview extent. Ownership is transferred to the overview.See also
- Parameters:
symbol (Optional[QgsFillSymbol])
- setInverted(self, inverted: bool)[source]¶
Sets whether the overview frame is
inverted
, ie, whether the shaded area is drawn outside the extent of the overview map.See also
- Parameters:
inverted (bool)
- setLinkedMap(self, map: QgsLayoutItemMap | None)[source]¶
Sets the
map
to show the overview extent of.See also
- Parameters:
map (Optional[QgsLayoutItemMap])