I have a wms layer and I want to pass the sld variable in a parameter. I refer to

Styling WMS layers in OL3 as well but cannot solve.

The fiddle is



tile_wms.getSource().updateParams({'styles':'', 'sld_body':_sld });

does not work. This is the basic for query and I a struck.

closed as off-topic by PolyGeo Feb 24 at 21:37

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I found a solution in ol3 dev group by Arnd Wippermann. It worked which is " as you have to use the name of your wms layer you want to style: <Name>ktmemis:rna_disaster_incident</Name> instead of <Name>Simple Point</Name>" please refer to the updated fiddle jsfiddle.net/shumanbaral/x6qwyuvk/8/ which works like a charm – Shuman Feb 5 '15 at 16:53