You can use an expression in the data defined override of the map rotation in each map to reference the "rotate"
attribute in the Blattschnitt
layer.

For example, for the rotation of 'Map 1'
:
Either get the feature using the Blatt nr
attribute:
attribute(
get_feature(
layer:='Blattschnitt',
attribute:='Blatt nr',
value:='Blatt 1'
),
'rotate'
)
Or simply by the feature id:
attribute(
get_feature_by_id(
layer:='Blattschnitt',
feature_id:=1
),
'rotate'
)
Both of these expressions will return -51,262
. Use the expression again for 'Map 2'
but alter the Blatt nr
attribute value, or feature_id
accordingly.
A dynamic solution
Alternatively, in the following example on my layer called sections
, I use the main_angle
function on the polygons to get the rotation angle dynamically. The section
number is referenced automatically by substringing the Map
id (in my case, the 5th character of the id is the number following Map
). In this case, the same expression can be used on each map, provided the map id number matches the section
number - no need to change anything.

with_variable('angle',
main_angle(
geometry(
get_feature('sections', 'section', 'section ' || substr(@map_id, 5, 5))
)
),
case
when @angle >= 90 and @angle < 180
then -@angle + 90
when @angle >= 0 and @angle < 90
then 90 - @angle
end
)
