In a map layout template, I want to insert an expression which gets all feature's names of a certain layer, which are contained in the current layout's view/extent. Is there a way to get an aggregate of all features of a layer which are contained in the current map view?
I've come so far, to check if a single feature of a layer is contained, but don't know how to go on from here:
contains(
map_get(item_variables('Main Map'), 'map_extent'),
nodes_to_points(geometry(get_feature_by_id('Corridors_86ef2ea9_d1a1_4d9f_9735_7b7b2fb54cb2', 2)))
)
I'm quite sure there is an expression combined with the aggregate function, which would enable me to concatenate all the names of the features in the current layout view and use this as a text item in my final layout.