$map function

Returns the id of the current map item if the map is being drawn in a composition, or "canvas" if the map is being drawn within the main QGIS window.

Syntax

$map

Arguments

None

Example

$map → "overview_map" (within a composer item)
$map → "canvas" (within the main QGIS main canvas)