Hi Shiv,
 
your code should work, but is your sld valid xml and is the named layer
correct?
 
If you request a MapServer layer, then in the mapfile sld must be enabled.
 
Arnd
 
 

  _____  

Von: [email protected]
[mailto:[email protected]] Im Auftrag von shiva
subramanya
Gesendet: Mittwoch, 18. Dezember 2013 14:46
An: openlayers-users
Betreff: [OpenLayers-Users] changing sld's dynamically just not working


Hi


I want to change SLD's dynamically on my map for the WMS layers with the
following code. 

           var sldfile = 'http://myserver/resources/sld/test.sld';
          layer.mergeNewParams({sld: sldfile,SLD_BODY: null});


But the map refreshes when i execute this and the styles dont change. 


I checked the accessibility of the sld url and it is accessible on the
network.


I need some help to make this work.


Thanks


Shiv

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to