TransWikia.com

Export central coordinates of current map in print layout

Geographic Information Systems Asked by Palemon on September 29, 2021

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.

enter image description here

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?

One Answer

you can use the following statement, assuming that you map in the mapcomposer has the id: map1. the example below gives you the x coordinate

x(map_get(item_variables('map1'), 'map_extent_center'))

enter image description here

Correct answer by eurojam on September 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP