Hello all, I am working with a Vector-Layer, which dynamically adds features to a Query-Layer. The feature-selection is done with a form on the website, which submits search-strings and I create a WFS-filter from the search-strings. This works, if I only have one filter (PropertyIsLike). Having another PropertyIsLike-Filter combined with an And-operator OpenLayers does not get any results.
Using FireBug I can spot the URL OL sends, and throwing this URL into the browser just gets me the results I am expecting. Some Code: var wfs_url = "http://some-wfs-server/needed-param?Service=WFS&maxfeatures=40&Version=1.0.0"; var filter = "%3CAnd%3E%3CPropertyIsLike%20wildCard='*'%20singleChar='.'%20escape='!'%3E%3CPropertyName%3E"+attribute+"%3C/PropertyName%3E%3CLiteral%3E"+value+"%3C/Literal%3E%3C/PropertyIsLike%3E"; var filter2 = '%3CPropertyIsEqualTo%3E%3CPropertyName%3E'+attribute2+'%3C/PropertyName%3E%3CLiteral%3E'+value2+'%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/And%3E'; var wfsurl = wfs_url + '&REQUEST=getfeature&typename=' + typename + '&Filter=%3CFilter%3E'+ filter + filter2 +'%3C/Filter%3E'; alert(wfsurl); OpenLayers.loadURL(wfsurl,'',null,highlight_them); The URL looks correct, it even works in the browser though. I am a little confused why it works in the Browser or with curl, but not within OL. Perhaps someone can give me a hint how to concatenate more than one filter-items into a WFS-query. Using OLs Filter-Objects does not lead to any results though, therefor I decided to manualy create the filter. Best regards Stephan
signature.asc
Description: PGP signature
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
