How to add SLD style which is written in String format and stored in a 'var' variable of javascript and asign it to a WMS layer while creating it.
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.
|
All you need to do is replace the styles parameter with an SLD parameter that contains your style. The following code from this example demonstrates the concept.
You may encounter problems if the SLD becomes too long as it may exceed the maximum URL length of your browser. In which case you will need to switch to POST instead of GET requests. |
|||
|
|