Hi,

I would like to use the "overlay_within" expression function, but in layout context - and in this case I dont have a "current_feature".

The goal is to find out the municipality from the map center of my main map in the layout (but not in atlas context).

What I tried:

-----------

with_variable(
  'current_geometry',
  make_point(
    x( map_get( item_variables( 'Hauptkarte'), 'map_extent_center' ) ),
    y( map_get( item_variables( 'Hauptkarte'), 'map_extent_center' ) )
  ),
  overlay_within(
    layer:='Gemeindegrenzen',
    expression:=gemeindename
   )
)

------------------

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.

Is there any way to "artificially" create a "$currentfeature", so that my overlay expression function would work?

Thanks for any ideas,

Andreas
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to