I try to make «copyright» decoration in QGIS dynamic. I have a surface layer «COMMUNE» with a "NAME" field. I try to write an expression that allows me to display this "NAME" in the decoration, I manage to get the center with [%geom_to_wkt( @map_extent_center) %]

but then I get lost between the get_feature and attribute().

1 Answer 1


Do you want to display the Name of the Commune that is in the center of the map in your "copyright" decoration?

If yes, this expression should get the job done:

 layer:= 'COMMUNE',
 filter:=contains( $geometry, @map_extent_center),
 concatenator:=', ')
  • That's work with this syntax : [% aggregate( 'communes','concatenate',"NAME",contains( $geometry, @map_extent_center),', ')%]. thx
    – pasqal
    Nov 20, 2019 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.