Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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...

share|improve this answer
add comment

I am trying to do the same. I came across the post.

http://underdark.wordpress.com/2010/06/10/dynamic-styling-and-filtering-of-a-geoserver-wms-using-openlayers-layer-wms-post/

Unfortunately, I haven't had luck to make it work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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