I am trying to export the centrum coordinates of the current map in the print layout, and show the coordinates as a text element.
I have succeeded to print the centrum coordinates of a geometry in the in the map when using the atlas tool, i.e. x( @atlas_geometry )
, and y( @atlas_geometry )
. The result shows like the image below.
But I would like to print the center coordinates of the current map, without having to use the atlas tool. I guess I will have to change the @atlas_geometry
to something similar to map_get()
, but I can't get it to work. Any ideas how I can solve this?