1

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

2

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:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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