[OpenLayers-Users] combine two OCG filters

Phil Scadden p.scadden at gns.cri.nz
Wed Apr 11 17:58:52 EDT 2012


That is very strange. Your syntax look right to me. I do something very 
similar:
         var filters = new Array();
         for (var i = 0; i < textQueryNode.fields.length; i++) {
             var filter = new OpenLayers.Filter.Comparison({
                 type: OpenLayers.Filter.Comparison.LIKE,
                 matchCase:false,
                 property: textQueryNode.fields[i].name,
                 value: "*" + searchText + "*"
             });
             filters.push(filter);
         }
         wfsProtocol[combo.value].read({
             filter: new OpenLayers.Filter.Logical({
                 type: OpenLayers.Filter.Logical.OR,
                 filters: filters
             }),
             callback: processSpatialQuery,
             scope: strategy
         });

which works okay. Have you looked at what OL actually generates in 
making the call? (I use the NET tab of firebug to see these). There 
might be some clues from how it is processed.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Users mailing list