Using GeoServer WFS to GetFeature by Clicking on it on the map

المشرف العام

Administrator
طاقم الإدارة
Can someone point me to document of crafting a Geoserver WFS GetFeature request with CQL_Filters?

I've already read the GeoServer CQL_Filter Geometric filter section

I have a Geoserver WMS set up to return multiple polygon geometries (from a postgres database) on the map. I now want to click on the map and in its click event, send a WFS GetFeature request to find the attributes associated with that geometry.

I read the tutorial and it looks like CQL_Filter Contains is what I need but I'm having trouble finding the correct syntax. I'm working with this URL at the moment:

var requestUrl = 'http://localhost:8080/geoserver/wfs...ENAME=namespace:layerCQL_FILTER=CONTAINS(geom, Point(' + location.longitude + ',' + location.latitude + '))';

When I post the above URL I get the following error:

http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd"> Could not parse CQL filter list.Encountered "," at line 1, column 40.
Was expecting one of:
"-" ...
<INTEGER_LITERAL> ...
<FLOATING_LITERAL> ...
Parsing : CONTAINS(geom, Point(-84.39313136004358,33.757086728151805)).

Thanks,Zi



أكثر...
 
أعلى