yagajs / leaflet-ng2

Angular.io integration of Leaflet
https://leaflet-ng2.yagajs.org
ISC License
66 stars 26 forks source link

Not able to add CQL_FILTER in setparams for layers #400

Closed dev-amitkmishra closed 6 years ago

dev-amitkmishra commented 6 years ago

I have different layers coming from geoserver and on one of the layer I need to implement filters, for that I am trying to set : this.mapComponent.addLayer(this.roof_geoServer.setParams( { layers: 'my_location_history', format: 'image/png', transparent: true, CQL_FILTER: "prediction=\'Flat\'" } )); But, I am getting the error of 'there is no any property like CQL_FILTER'. Please helo in solving this issue or in a way I can apply filter on a layer.

atd-schubert commented 6 years ago

Do you try using cql_filter (in lower case) according to this Answer?

In addition you should not use addLayer to add a WMS layer. Prefer the YAGA WML-Layer directive instead...