How to change predefile SLD in client side? The reason I want this is I want to turn label on and off on client side.
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
Easiest way is to have two SLD files and change the style in the WMS request depending on if you want labels on or off. Alternatively you could have a separate layer with just labels and turn that on/off as needed. Or you could try to have a local SLD file and upload it with each request but that will be slower and much harder to handle on the client. |
||||
|
|
|
you should look Styled Layer Descriptor (SLD) example on openlayers here about parsing SLD and applying styles to a vector layer of course you will use in openlayers.. i hope it helps you... |
|||
|
|
|
I am trying to do the same. I came across the post. Unfortunately, I haven't had luck to make it work. |
|||
|
|
