<DIV>Hello,</DIV>
<DIV>Dose the OpenLayers.Layer.WFS construction method support the Filter method.I cannot get the WFS layer after I add a Filter parameter to the OpenLayers.Layer.WFS construction method.The code is like this:</DIV>
<DIV>layer = new OpenLayers.Layer.WFS(<BR> "Analyze (WFS)", <BR> "<A href="http://192.168.6.140:8080/geoserver/wfs">http://192.168.6.140:8080/geoserver/wfs</A>",<BR> { <BR> request: 'GetFeature',<BR> typeName:'topp:analyze',<BR> FILTER:'%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E'</DIV>
<DIV>},<BR> {maxResolution: 3.986275569928255E-5, projection: "EPSG:4326", buffer: 0},<BR> { featureClass: OpenLayers.Feature.WFS}<BR> <BR> );<BR> map.addLayer(layer);</DIV>
<DIV>But after I remove the filter parameter,the WFS layer will appear on the map. The code is below:</DIV>
<DIV>
<DIV>layer = new OpenLayers.Layer.WFS(<BR> "Analyze (WFS)", <BR> "<A href="http://192.168.6.140:8080/geoserver/wfs">http://192.168.6.140:8080/geoserver/wfs</A>",<BR> { <BR> request: 'GetFeature',<BR> typeName:'topp:analyze'</DIV>
<DIV>},<BR> {maxResolution: 3.986275569928255E-5, projection: "EPSG:4326", buffer: 0},<BR> { featureClass: OpenLayers.Feature.WFS}<BR> <BR> );<BR> map.addLayer(layer);</DIV>
<DIV>And what's more I can get the GML result by directly typing the request in the browser: <A href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E">http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E</A></DIV>
<DIV>The result is below:</DIV>
<DIV> <FONT color="#0000ff"><SPAN class="m"><?</SPAN><SPAN class="pi">xml version="1.0" encoding="UTF-8" </SPAN><SPAN class="m">?></SPAN></FONT>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">wfs:FeatureCollection</FONT></SPAN><SPAN class="ns"><FONT color="#ff0000"> xmlns</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B class="ns"><FONT color="#ff0000">http://www.opengis.net/wfs</FONT></B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="ns"><FONT color="#ff0000"> xmlns:wfs</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B class="ns"><FONT color="#ff0000">http://www.opengis.net/wfs</FONT></B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="ns"><FONT color="#ff0000"> xmlns:topp</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B class="ns"><FONT color="#ff0000">http://www.openplans.org/topp</FONT></B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="ns"><FONT color="#ff0000"> xmlns:gml</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B class="ns"><FONT color="#ff0000">http://www.opengis.net/gml</FONT></B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="ns"><FONT color="#ff0000"> xmlns:xsi</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B class="ns"><FONT color="#ff0000">http://www.w3.org/2001/XMLSchema-instance</FONT></B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="t"><FONT color="#990000"> xsi:schemaLocation</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>http://www.openplans.org/topp http://192.168.6.140:8080/geoserver/wfs/DescribeFeatureType?typeName=topp:analyze http://www.opengis.net/wfs http://192.168.6.140:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd</B><FONT color="#0000ff"><SPAN class="m">"</SPAN><SPAN class="m">></SPAN></FONT></DIV>
<DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:boundedBy</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV>
<DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><FONT color="#990000"><SPAN class="t">gml:Box</SPAN><SPAN class="t"> srsName</SPAN></FONT><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>http://www.opengis.net/gml/srs/epsg.xml#4326</B><FONT color="#0000ff"><SPAN class="m">"</SPAN><SPAN class="m">></SPAN></FONT></DIV>
<DIV>
<DIV class="e">
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:coordinates</FONT></SPAN><SPAN class="ns"><FONT color="#ff0000"> xmlns:gml</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B class="ns"><FONT color="#ff0000">http://www.opengis.net/gml</FONT></B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="t"><FONT color="#990000"> decimal</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>.</B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="t"><FONT color="#990000"> cs</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>,</B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="t"><FONT color="#990000"> ts</FONT></SPAN><FONT color="#0000ff"><SPAN class="m">="</SPAN><B></B><SPAN class="m">"</SPAN><SPAN class="m">></SPAN></FONT><SPAN class="tx"><STRONG>97.51721382,0.00470831 97.52223518,0.00781349</STRONG></SPAN><SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:coordinates</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN> </DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:Box</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:boundedBy</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:featureMember</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV>
<DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><FONT color="#990000"><SPAN class="t">topp:analyze</SPAN><SPAN class="t"> fid</SPAN></FONT><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>analyze.1</B><FONT color="#0000ff"><SPAN class="m">"</SPAN><SPAN class="m">></SPAN></FONT></DIV>
<DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">topp:the_geom</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV>
<DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><FONT color="#990000"><SPAN class="t">gml:MultiLineString</SPAN><SPAN class="t"> srsName</SPAN></FONT><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>http://www.opengis.net/gml/srs/epsg.xml#4326</B><FONT color="#0000ff"><SPAN class="m">"</SPAN><SPAN class="m">></SPAN></FONT></DIV>
<DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:lineStringMember</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV>
<DIV>
<DIV class="e">
<DIV class="c" style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><A class="b" onfocus="h()" onclick="return false" href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&typeName=topp:analyze&FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3C/ogc:Filter%3E#"><STRONG><FONT face="Courier New" color="#ff0000">-</FONT></STRONG></A> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:LineString</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV>
<DIV>
<DIV class="e">
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:coordinates</FONT></SPAN><SPAN class="ns"><FONT color="#ff0000"> xmlns:gml</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B class="ns"><FONT color="#ff0000">http://www.opengis.net/gml</FONT></B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="t"><FONT color="#990000"> decimal</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>.</B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="t"><FONT color="#990000"> cs</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">="</FONT></SPAN><B>,</B><SPAN class="m"><FONT color="#0000ff">"</FONT></SPAN><SPAN class="t"><FONT color="#990000"> ts</FONT></SPAN><FONT color="#0000ff"><SPAN class="m">="</SPAN><B></B><SPAN class="m">"</SPAN><SPAN class="m">></SPAN></FONT><SPAN class="tx"><STRONG>97.51721382,0.00540555 97.51963792,0.00542299</STRONG></SPAN><SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:coordinates</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN> </DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:LineString</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:lineStringMember</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:MultiLineString</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">topp:the_geom</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV class="e">
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"><</FONT></SPAN><SPAN class="t"><FONT color="#990000">topp:Id</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN><SPAN class="tx"><STRONG>1</STRONG></SPAN><SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">topp:Id</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN> </DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">topp:analyze</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">gml:featureMember</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV>
<DIV><SPAN class="b"><STRONG><FONT face="Courier New" color="#ff0000"> </FONT></STRONG></SPAN> <SPAN class="m"><FONT color="#0000ff"></</FONT></SPAN><SPAN class="t"><FONT color="#990000">wfs:FeatureCollection</FONT></SPAN><SPAN class="m"><FONT color="#0000ff">></FONT></SPAN></DIV></DIV></DIV></DIV></DIV>
<DIV> </DIV><br><!-- footer --><br>
<hr>
<font style="font-size:12px;line-height:15px;">超大花房赠送,60万</font><a style="font-size:12px;line-height:15px; color:blue; text-decoration:underline;" href="http://popme.163.com/link/003984_0829_258.html">轻松入住顺鑫花语</a>