I have a parametric SQL view for a WFS layer in GeoServer with the simplified form:
SELECT pts.id AS id, pts.geom as geom FROM schema_name.points_table pts WHERE ST_Contains(%g%, pts.geom);
I want to use this query as a filter for a Leaflet app, in which the user can edit a polygon to get only points in a defined area. Which steps are necessary to pass the geometry of my
L.polygon object through the
viewparams parameter into the
%g% placeholder in my query?