Hi,
you need to specify filterType. The control will take care of providing
the values. So:
var control = new OpenLayers.Control.GetFeature({
..
filterType: OpenLayers.Filter.Spatial.INTERSECTS
..
});
Best regards,
Bart
>
> Dear Friends,
>
> I am trying to apply spatial filter to my GEtfeature requests on WFS layer
> atop a WMS.
>
> If I look at the spatial filter documentation
>
> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html
> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html
>
> I find that there are 3 things that need to be mentioned in all except the
> DWITHIN filter.
>
> What do I specify for 1) property 2) value parameter of the Spatial Filter
> constructor.
>
> The value parameter requires either bounds or the geometry.How do I get
> that for the box I am creating?
>
> My code is:
>
> control = new OpenLayers.Control.GetFeature({
>
> protocol: OpenLayers.Protocol.WFS({
>
> formatOptions: {
> outputFormat: "text/xml"
> },
> url:
> "/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/Shape/Rail_wfs.map",
> featureType: 'RailwayStations',
> featurePrefix: 'ms',
> geometryName: 'msgeometry',
> maxFeatures: 100,
> var defaultFilter: new OpenLayers.Filter.Spatial({
> type: OpenLayers.Filter.Spatial.INTERSECTS})
> }),
> box: true,
> multipleKey: "shiftKey"
>
> });
>
> Pls change the defaultFilter so that it gets the above two parameters.
>
> What is the purpose of BBOX Filter?
> How to use the "buffer" parameter for getting feature details outside of
> the
> box?
>
> Thanks for your attention & efforts.
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Spatial-Filter-parameter-for-WFS-GetFeature-tp4968446p4968446.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users