I am developing web application which has leaflet maps. I need the layer control which is similar to QGIS

layer control

I am using Geoserver to get the layer as wms format and I added that layer using tilelayer.wms function. I am using jstree plugin for tree like structure of layers. So when user checks any layer I added that layer using map.addLayer() function. When user unchecks the layer I used map.removeLayer() function. So now question is I want to add or remove the layer based on it's style like this

enter image description here

How to achieve this functionality using leaflet and geoserver and jstree.

1 Answer 1


I got the it worked by layer.setParams() function in leaflet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.