<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">It does work. Maybe there is something wrong with your SLD?<div><br></div><div>Have you verified that your SLD works if you use it in GeoServer as the default style?</div><div><br></div><div>Bart</div><div><br><div><div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">--</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Bart van den Eijnden<br>Front-end Developer | Boundless<br>@boundlessgeo</div>
</div>
<br><div style=""><div>On 20 Dec 2013, at 05:56, shiva subramanya <<a href="mailto:shiv@atree.org">shiv@atree.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div>I use openlayers with geoserver. Even though layer.mergeNewParams" does seem to refresh the map, it still is picking up the default SLD which has been set for the layer when it was published on geoserver. It doesnt seem to be picking the new SLD being pointed to.<br>
<br></div>Does "mergeNewParams" for SLD work for geoserver at all, thats my doubt now?<br><br></div>Shiv<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 20, 2013 at 12:25 AM, Arnd Wippermann <span dir="ltr"><<a href="mailto:arnd.wippermann@web.de" target="_blank">arnd.wippermann@web.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>



<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">Hi Shiv,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">your code should work, but </font></span><span><font color="#0000ff" face="Arial">is your sld valid 
xml and </font></span><span><font color="#0000ff" face="Arial">is the named layer correct?</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">If you request a MapServer layer, then in the mapfile sld must 
be enabled.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">Arnd</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial"></font></span> </div><br>
<div dir="ltr" align="left" lang="de">
<hr>
<font face="Tahoma"><b>Von:</b> <a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a> 
[mailto:<a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a>] <b>Im Auftrag von </b>shiva 
subramanya<br><b>Gesendet:</b> Mittwoch, 18. Dezember 2013 14:46<br><b>An:</b> 
openlayers-users<br><b>Betreff:</b> [OpenLayers-Users] changing sld's 
dynamically just not working<br></font><br></div><div><div class="h5">
<div></div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>Hi<br><br></div>I want to change SLD's dynamically on my map for the WMS 
layers with the following code. <br><br>  
         var sldfile = '<a href="http://myserver/resources/sld/test.sld" target="_blank">http://myserver/resources/sld/test.sld</a>';<br>          
layer.mergeNewParams({sld: sldfile,SLD_BODY: null});<br><br></div>But the map 
refreshes when i execute this and the styles dont change. <br><br></div>I 
checked the accessibility of the sld url and it is accessible on the 
network.<br><br></div>I need some help to make this 
work.<br><br></div>Thanks<br><br></div>Shiv<br></div></div></div></div>
</blockquote></div><br></div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/openlayers-users</blockquote></div><br></div></div></body></html>