[OpenLayers-Users] rules with multiple filters ?

Didrik Pinte lists at dipole-consulting.com
Tue Nov 4 10:48:40 EST 2008


I guess I found the answer (not tested)

Using a Filter.Logical object should solve the problem

var filter1 = new OpenLayers.Filter.Comparison(
                    {
                        type: OpenLayers.Filter.Comparison.EQUAL_TO,
                        property: "count",
                        value: 1,
                    });
var filter2 = new OpenLayers.Filter.Comparison(
                    {
                        type: OpenLayers.Filter.Comparison.EQUAL_TO,
                        property: "tree_class",
                        value: 1,
                    });

var filterAll = new OpenLayers.Filter.Logical({filters: [filter1,
filter2], type: OpenLayers.Filter.Locical.AND});


Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081104/365e4755/attachment.bin


More information about the Users mailing list