<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi,<br><br><span>I did not use a filter yet. But I think you can find some examples at example page of OL (<a target="_blank" href="http://dev.openlayers.org/releases/OpenLayers-2.9/examples/filter.html">http://dev.openlayers.org/releases/OpenLayers-2.9/examples/filter.html</a> for example).</span> <br>There is no filter named "buffer". You can make a GetFeature request with param "buffer"(distance).<br>DWITHIN is using a distance property, so all features that are all within that area is selected. With intersect you can select features that are overlay that area with only part of their geometry. But you will find some more information about that kind of filters at web.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hope that helped a little
 bit.<br><br>best regards<br>Sarah<br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;"></span></b></font><br><br>Hi Sarah,<br><br>thanks for your reply.<br><br>If I look at the spatial filter documentation<br><a href="http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html" target="_blank">http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html</a> <br><a href="http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html" target="_blank">http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html</a> <br><br>I find that there are 3 things that need to be mentioned in all except the<br>DWITHIN filter.<br><br>What do I specify for 1) property 2) value parameter of the Spatial
 Filter<br>constructor.<br><br>the value parameter&nbsp; requires either bounds or the geometry.How do I get<br>that for the box I am creating?<br><br>My code is:<br><br> control = new OpenLayers.Control.GetFeature({<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  protocol: OpenLayers.Protocol.WFS({<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  formatOptions: {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  outputFormat: "text/xml"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  url:<br>"/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/Shape/Rail_wfs.map",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  featureType: 'RailwayStations',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp;  featurePrefix: 'ms',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  geometryName: 'msgeometry',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  maxFeatures: 100,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  var defaultFilter: new OpenLayers.Filter.Spatial({<br>type: OpenLayers.Filter.Spatial.INTERSECTS}, {value: bounds}) <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }),<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  box: true,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  multipleKey: "shiftKey"<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  });<br><br>Pls change the defaultFilter so that it gets the above two parameters.<br><br>What is the purpose of DWITHIN,BBOX Filter?<br>There is no Filter by the name of "buffer"?<br><br>Thanks a lot for your help.<br>--
 <br>View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/control-SelectFeature-tp4930933p4968003.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/control-SelectFeature-tp4930933p4968003.html</a><br>Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@openlayers.org" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br></div></div>
</div><br></body></html>