Class: QgsLayoutItem3DMap

Implements support of 3D map views in print layouts.

Added in version 3.4.

Class Hierarchy

Inheritance diagram of qgis._3d.QgsLayoutItem3DMap

Base classes

QgsLayoutItem

Base class for graphical items within a QgsLayout.

QgsLayoutObject

A base class for objects which belong to a layout.

QObject

QgsExpressionContextGenerator

Abstract interface for generating an expression context.

QGraphicsRectItem

QAbstractGraphicsShapeItem

QGraphicsItem

QgsLayoutUndoObjectInterface

Interface for layout objects which support undo/redo commands.

QgsTemporalRangeObject

Base class for objects with an associated (optional) temporal range.

Methods

assignFreeId

Sets the map id() to a number not yet used in the layout.

cameraPose

Returns camera view

mapSettings

Returns map scene.

setCameraPose

Configures camera view

setMapSettings

Configures map scene

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsLayoutItem3DMap. See the FAQ for more details.

displayName

overridden to show "3D Map 1" type names

Static Methods

create

Returns a new 3D map item for the specified layout.

class qgis._3d.QgsLayoutItem3DMap[source]

Bases: QgsLayoutItem, QgsTemporalRangeObject

__init__(layout: QgsLayout | None)

Constructor for QgsLayoutItem3DMap, with the specified parent layout.

Ownership is transferred to the layout.

Parameters:

layout (Optional[QgsLayout])

assignFreeId(self)[source]

Sets the map id() to a number not yet used in the layout. The existing id() is kept if it is not in use.

cameraPose(self) QgsCameraPose[source]

Returns camera view

Return type:

QgsCameraPose

static create(layout: QgsLayout | None) QgsLayoutItem3DMap | None[source]

Returns a new 3D map item for the specified layout.

The caller takes responsibility for deleting the returned object.

Parameters:

layout (Optional[QgsLayout])

Return type:

Optional[QgsLayoutItem3DMap]

virtual displayName(self) str[source]

overridden to show “3D Map 1” type names

Return type:

str

mapSettings(self) Qgs3DMapSettings | None[source]

Returns map scene. May be None if not yet configured.

Return type:

Optional[Qgs3DMapSettings]

setCameraPose(self, pose: QgsCameraPose)[source]

Configures camera view

Parameters:

pose (QgsCameraPose)

setMapSettings(self, settings: Qgs3DMapSettings | None)[source]

Configures map scene

Ownership is transferred to the item.

Parameters:

settings (Optional[Qgs3DMapSettings])