<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>I would like to use the "overlay_within" expression function, but in layout context - and in this case I dont have a "current_feature".</p>
<p>The goal is to find out the municipality from the map center of my main map in the layout (but not in atlas context).</p>
<p>What I tried:</p>
<p>-----------</p>
<p>with_variable(<br /> 'current_geometry',<br /> make_point(<br /> x( map_get( item_variables( 'Hauptkarte'), 'map_extent_center' ) ),<br /> y( map_get( item_variables( 'Hauptkarte'), 'map_extent_center' ) )<br /> ),<br /> overlay_within(<br /> layer:='Gemeindegrenzen',<br /> expression:=gemeindename<br /> )<br />)</p>
<p>------------------</p>
<p>But apparently the "overlay_within" geometry function needs a "$currentfeature" - which I don't have, but could create artificially with make_point from the map center.</p>
<p>Is there any way to "artificially" create a "$currentfeature", so that my overlay expression function would work?</p>
<p>Thanks for any ideas,</p>
<p>Andreas</p>
<p><br /></p>
<p><br /></p>
</body></html>