Class: QgsLayoutItemMapOverviewStack¶
A collection of overviews which are drawn above the map content in a
QgsLayoutItemMap. The overview stack controls which
overviews are drawn and the order they are drawn in.
See also
Class Hierarchy¶
Base classes¶
A collection of map items which are drawn above the map content in a |
- class qgis.core.QgsLayoutItemMapOverviewStack[source]¶
Bases:
QgsLayoutItemMapItemStack- __init__(map: QgsLayoutItemMap | None)
Constructor for QgsLayoutItemMapOverviewStack, attached to the specified
map.- Parameters:
map (Optional[QgsLayoutItemMap])
- __init__(a0: QgsLayoutItemMapOverviewStack)
- Parameters:
- addOverview(self, overview: QgsLayoutItemMapOverview | None)[source]¶
Adds a new map
overviewto the stack and takes ownership of the overview. The overview will be added to the end of the stack, and rendered above any existing map overviews already present in the stack.Note
After adding a overview to the stack,
update()should be called for theQgsLayoutItemMapto prevent rendering artifacts.See also
- Parameters:
overview (Optional[QgsLayoutItemMapOverview])
- asList(self) List[QgsLayoutItemMapOverview]¶
Returns a list of
QgsLayoutItemMapOverviewscontained by the stack.- Return type:
- modifyMapLayerList(self, layers: Iterable[QgsMapLayer]) List[QgsMapLayer]¶
Alters the list of map
layerswhich will be rendered for the link map item, inserting temporary layers which represent overview extents as required.Added in version 3.6.
- Parameters:
layers (Iterable[QgsMapLayer])
- Return type:
- moveOverviewDown(self, overviewId: str | None)[source]¶
Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews.
Note
After moving an overview within the stack,
update()should be called for theQgsLayoutItemMapto redraw the map with the new overview stack order.See also
- Parameters:
overviewId (Optional[str])
- moveOverviewUp(self, overviewId: str | None)[source]¶
Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews.
Note
After moving an overview within the stack,
update()should be called for theQgsLayoutItemMapto redraw the map with the new overview stack order.See also
- Parameters:
overviewId (Optional[str])
- overview(self, overviewId: str | None) QgsLayoutItemMapOverview | None[source]¶
Returns a reference to an overview with matching overviewId within the stack.
overview(self, index: int) -> Optional[QgsLayoutItemMapOverview] Returns a reference to an overview at the specified
indexwithin the stack.- Parameters:
overviewId (Optional[str])
- Return type:
Optional[QgsLayoutItemMapOverview]
- removeOverview(self, overviewId: str | None)[source]¶
Removes an overview with matching overviewId from the stack and deletes the corresponding
QgsLayoutItemMapOverviewNote
After removing an overview from the stack,
update()should be called for theQgsLayoutItemMapto prevent rendering artifacts.See also
- Parameters:
overviewId (Optional[str])