In print composer, I would like to syncronize the scale of the map with the Grid scale. For example, in print composer I am making a map in 1/1000 scale, so I go to grid,and insert "map units" x=100 y=100. I am copying this map layout and in the second map the scale that fits is 1/200, so I go to grid,and insert "map units" x=20 y=20... Is there an expresion to write, so it can understand the map scale and autochange the grid scale? In grid decoration that happens automaticaly with zoom in-out, can I do the same in print composer?
There are lots of different types of Grids in QGIS, so I want to make sure we're talking about the same thing. This is the type of grid I think you're talking about:
A Map Grid on a Map Item in the Print layout
No, the map grid in print layout doesn't accept expressions.
Since the feature you want doesn't exist, here's a workaround that might help you.
- Open a new print layout. Add a map item, and add many grids, one at every single possible scale you could ever want.
- As you create each grid, un-check the box that says "Draw "[grid name]" Grid."
- Change the name of each grid from the default (Grid 1, Grid 2, etc) to something that tells you what scale it is, like "20x20", "100x100", etc.
- Save this map as a template, and use the "load items from template" button to load it into your print layout.
- Select the grid you want, and check the box that says "Draw "[grid name]" Grid".