[QGIS-Developer] map_id variable of 3d view?

Nyall Dawson nyall.dawson at gmail.com
Sun Jan 14 15:20:20 PST 2018


On 13 January 2018 at 07:49, Andreas Neumann <a.neumann at carto.net> wrote:
> Hi,
>
> There is a variable called @map_id - which is 'canvas' for the main QGIS map
> canvas. In map composer it can have a user-defined id. I wonder, what is the
> map_id of a 3D canvas? And what are the map_ids of additional 2D canvases
> besides the main one?

I've looked - and for 3d canvases it's not defined (e.g. NULL). That's
because it's assigned by the map settings scope, which is not used in
the 3d renderer. It'd be easy to add a 3d counterpart to this though.
Can you open a bug report?

Additionally 2d canvases will still use "canvas" as the id.

> The reason I ask is that I want to create symbology rules for 2d only. The
> same symbology rule should be supressed in the 3d view, because in 3d there
> are other representations (cylinder, spheres, models). So I thought I could
> make a symbology rule that says "@map_id != '3dcanvas'"

That's a valid use case. But I think it may be better served if the 3d
canvas allowed for use of map themes. This would also bring
consistency between additional 2d canvases and the 3d views.

Nyall


More information about the QGIS-Developer mailing list