Search code examples
javascriptopenlayers-3geoserverwms

Dynamically change style of a WMS layer already loaded


I want to create a panel where the user will be able to change the style of a selected layer.

For vector layer, there is no problem updating the ol.style config, but I don't really know how to proceed for an ImageWMS layer.

Based on this post, I'm guessing I need to add a new SLD file to the layer and refresh it, but how can this be achieved with OL3 ?


Solution

  • I hope this is what you are looking for

    http://opendem.info/ol3/wms_sld.html