AnsweredAssumed Answered

Filter WMSLayer using CQL_FILTER and customLayerParameters

Question asked by robitaillej on Oct 2, 2020
Latest reply on Oct 7, 2020 by robitaillej

Hello,

I am trying to get the CQL_FILTER working in order to filter WMSLayer filtered. I am using the customLayerParameters to do that:

            const layer_oiseaux = new WMSLayer({
                url: "https://ogsl.ca/geoserver/eccc_atlas/wms?",
                sublayers: [
                    {
                        name: "eccc_atlas:AireEtude_Publ_janv2019",
                        popupEnabled: true,
                        queryable: true,
                    }
                ],
                visible: true,
                customLayerParameters: [{
                    CQL_FILTER: "shape_leng>1000"
                }]
            });
            map.add(layer_oiseaux);

Hoever, nothing is happening, the parameter CQL_FILTER doesn't seem to work. Is this normal? 

Is there another way to filter WMS layers? 

Thank you!

Outcomes