<DIV>hi Eric Lemoine: <BR>&nbsp;Thank you very much. It may be may be that my problem is caused by the bound conflict of the bounds. But after I set the filter to get all the features of the layer, the wfs layer cannot appear either, and if I remove the filter parameter, the wfs layer will appear on the map. I'm very confused with this. So thank you very much for replying.<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp; Best Regards.&nbsp;&nbsp;&nbsp; <BR>&nbsp;<BR>&nbsp;<BR>&nbsp;</DIV>
<DIV><BR>ÔÚ2008-08-26£¬"Eric Lemoine" &lt;<A href="mailto:eric.c2c@gmail.com">eric.c2c@gmail.com</A>&gt; Ð´µÀ£º<BR>&gt;Hi. Layer.WFS already sets a bbox param in the GetFeature request, and<BR>&gt;bbox is incompatible with filter. I'm not familiar enough with<BR>&gt;GeoServer to be sure, but it may be that the bbox param takes<BR>&gt;precedence over the filter one. With MapServer 4 filter takes<BR>&gt;precedence over bbox, while MapServer 5 returns an error. Hope this<BR>&gt;helps. Eric<BR>&gt;<BR>&gt;2008/8/25, lorkyo :<BR>&gt;&gt;&nbsp; Hi,<BR>&gt;&gt;&nbsp; I have come accross the layer when I use add&nbsp; Filter parameters to request<BR>&gt;&gt; features. part of my codes are below and the features are not shown in the<BR>&gt;&gt; map:<BR>&gt;&gt; ***********code**********<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; layer = new OpenLayers.Layer.WFS(<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Analyze (WFS)",<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<A href="http://192.168.6.140:8080/geoserver/wfs">http://192.168.6.140:8080/geoserver/wfs</A>",<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; request: 'GetFeature',<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeName:'topp:analyze',<BR>&gt;&gt;<BR>&gt;&gt; FILTER:'%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsGreaterThan%3E%3Cogc:PropertyName%3EId%3C/ogc:PropertyName%3E%3Cogc:Literal%3E0%3C/ogc:Literal%3E%3C/ogc:PropertyIsGreaterThan%3E%3C/ogc:Filter%3E'<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; },<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {maxExtent: bounds, maxResolution: 3.986275569928255E-5, projection:<BR>&gt;&gt; "EPSG:4326", buffer: 0},<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { featureClass: OpenLayers.Feature.WFS}<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(layer);<BR>&gt;&gt; ***********code**********<BR>&gt;&gt; The feature is not shown on the map. However, after remove the parameter<BR>&gt;&gt; Filter like below, the wfs layer then appear on the map:<BR>&gt;&gt; ***********code**********<BR>&gt;&gt;&nbsp;&nbsp; layer = new OpenLayers.Layer.WFS(<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Analyze (WFS)",<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<A href="http://192.168.6.140:8080/geoserver/wfs">http://192.168.6.140:8080/geoserver/wfs</A>",<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; request: 'GetFeature',<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typeName:'topp:analyze'},<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {maxExtent: bounds, maxResolution: 3.986275569928255E-5, projection:<BR>&gt;&gt; "EPSG:4326", buffer: 0},<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { featureClass: OpenLayers.Feature.WFS});<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(layer);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp; **********code****************<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; And I'm sure with the value filter because I can get the result through<BR>&gt;&gt; browser with following url which is copied from the former js code:<BR>&gt;&gt;<BR>&gt;&gt; <A href="http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&amp;typeName=topp:analyze&amp;FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsGreaterThan%3E%3Cogc:PropertyName%3EId%3C/ogc:PropertyName%3E%3Cogc:Literal%3E0%3C/ogc:Literal%3E%3C/ogc:PropertyIsGreaterThan%3E%3C/ogc:Filter%3E">http://192.168.6.140:8080/geoserver/wfs?request=GetFeature&amp;typeName=topp:analyze&amp;FILTER=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsGreaterThan%3E%3Cogc:PropertyName%3EId%3C/ogc:PropertyName%3E%3Cogc:Literal%3E0%3C/ogc:Literal%3E%3C/ogc:PropertyIsGreaterThan%3E%3C/ogc:Filter%3E</A><BR>&gt;&gt; the result appear on my browser after I typed this url is:<BR>&nbsp;*******************<BR>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; <BR>- &lt;wfs:FeatureCollection xmlns="<A href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A>" xmlns:wfs="<A href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A>" xmlns:topp="<A href="http://www.openplans.org/topp">http://www.openplans.org/topp</A>" xmlns:gml="<A href="http://www.opengis.net/gml">http://www.opengis.net/gml</A>" xmlns:xsi="<A href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>" xsi:schemaLocation="<A href="http://www.openplans.org/topp">http://www.openplans.org/topp</A> <A href="http://192.168.6.140:8080/geoserver/wfs/DescribeFeatureType?typeName=topp:analyze">http://192.168.6.140:8080/geoserver/wfs/DescribeFeatureType?typeName=topp:analyze</A> <A href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A> <A href="http://192.168.6.140:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">http://192.168.6.140:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd</A>"&gt;<BR>- &lt;gml:boundedBy&gt;<BR>- &lt;gml:Box srsName="<A href="http://www.opengis.net/gml/srs/epsg.xml#4326">http://www.opengis.net/gml/srs/epsg.xml#4326</A>"&gt;<BR>&nbsp; &lt;gml:coordinates xmlns:gml="<A href="http://www.opengis.net/gml">http://www.opengis.net/gml</A>" decimal="." cs="," ts=""&gt;97.51721382,0.00470831 97.52223518,0.00781349&lt;/gml:coordinates&gt; <BR>&nbsp; &lt;/gml:Box&gt;<BR>&nbsp; &lt;/gml:boundedBy&gt;<BR>- &lt;gml:featureMember&gt;<BR>- &lt;topp:analyze fid="analyze.1"&gt;<BR>- &lt;topp:the_geom&gt;<BR>- &lt;gml:MultiLineString srsName="<A href="http://www.opengis.net/gml/srs/epsg.xml#4326">http://www.opengis.net/gml/srs/epsg.xml#4326</A>"&gt;<BR>- &lt;gml:lineStringMember&gt;<BR>- &lt;gml:LineString&gt;<BR>&nbsp; &lt;gml:coordinates xmlns:gml="<A href="http://www.opengis.net/gml">http://www.opengis.net/gml</A>" decimal="." cs="," ts=""&gt;97.51721382,0.00540555 97.51963792,0.00542299&lt;/gml:coordinates&gt; <BR>&nbsp; &lt;/gml:LineString&gt;<BR>&nbsp; &lt;/gml:lineStringMember&gt;<BR>&nbsp; &lt;/gml:MultiLineString&gt;<BR>&nbsp; &lt;/topp:the_geom&gt;<BR>&nbsp; &lt;topp:Id&gt;1&lt;/topp:Id&gt; <BR>&nbsp; &lt;/topp:analyze&gt;<BR>&nbsp; &lt;/gml:featureMember&gt;<BR>&nbsp;&lt;/wfs:FeatureCollection&gt;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So have anyone encountered this problem or can help me find out why?<BR><BR>&nbsp; Best regards!</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>