Yes, I already tried that but nothing changes.

The request xml is:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"; service="WFS"
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; xmlns:xsi="http://www.w3.org
/2001/XMLSchema-instance">
<wfs:Query typeName="fs" srsName="EPSG:900913">
 <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc";>
   <ogc:PropertyIsEqualTo matchCase="true">
        <ogc:PropertyName>approved</ogc:PropertyName>
        <ogc:Literal>true</ogc:Literal>
   </ogc:PropertyIsEqualTo>
 </ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

But in geoserver I get:

Request: getFeature
handle = null
service = WFS
 version = 1.1.0
baseUrl = http://localhost:8080/geoserver/
 providedVersion = null
query = [net.opengis.wfs.impl.querytypei...@12320ff (group: null,
propertyName: null, function: null, filter: null, sortBy: null,
featureVersion: null, handle: null, srsName: EPSG:4326, typeName: [fs])]
 maxFeatures = null
outputFormat = text/xml; subtype=gml/3.1.1
resultType = results
 traverseXlinkDepth = null
traverseXlinkExpiry = null
formatOptions = {}

In particular in the query params the filter is set to null.

Thanks

2010/11/22 Andreas Hocevar <[email protected]>

> Hi,
>
> try with
>
> value: "true"
>
> instead of
>
> value: true
>
> Regards,
> Andreas.
>
> On Nov 22, 2010, at 11:10 , Simone Dalmasso wrote:
>
> > Hi list, I would like to ask features to geoserver while applying a
> comparison filter to the request. Here's my code:
> >
> > var sites = new OpenLayers.Layer.Vector('Sites',{
> >                               styleMap: styleMap,
> >                               strategies: [new
> OpenLayers.Strategy.Fixed()],
> >                               projection: new
> OpenLayers.Projection("EPSG:4326"),
> >                               protocol: new OpenLayers.Protocol.WFS({
> >                                       version: "1.1.0",
> >                                       srsName: "EPSG:4326",
> >                                       url: '/geoserver/wfs/',
> >                                       featureType: 'ftype',
> >                                   featurePrefix: "prefix"
> >                               }),
> >                               filter: new
> OpenLayers.Filter.Comparison({type:
> OpenLayers.Filter.Comparison.EQUAL_TO,property: 'approved',value: true})
> >                       }
> >
> > The request seems to contain the tag ogc:filter but what i get back is
> not filtered data.
> > Thanks for your help
> >
> > --
> > Simone
> >
> > _______________________________________________
> > Users mailing list
> > [email protected]
> > http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
>


-- 
Simone Dalmasso, Ing.
ITHACA
Information Technology for Humanitarian Assistance, Cooperation and Action
www.ithacaweb.org
Via Pier Carlo Boggio 61 - 10138 Torino
Tel: +39.011.1975.1854
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to