[Users] change the sld in mapPanel

Matt Priour mpriour at kestrelcomputer.com
Sat May 28 23:23:13 CEST 2011


You're on the right track.
If you have an SLD file that is web accessible by the geoserver instance, then you can provide a link to that via the SLD parameter
If you are doing any kind of dynamic styling and changing portion of the SLD and the SLD is not overly complex (ie long) then you can use the SLDBODY parameter to pass an encoded SLD defination.

FOR EXAMPLE:
layer.mergeNewParams({sld:'http://my.com/cool.sld'});

Matt Priour
Kestrel Computer Consulting


From: hassane allouch 
Sent: Saturday, May 28, 2011 10:56 AM
To: Users at geoext.org 
Subject: [Users] change the sld in mapPanel


Hi,


i published a layer with geoserver 2.1.0.  by default i choose the style polygon, after using it in a map panel. By clicking on a bouton i want to change just the sld of the layer not the layer.

i used layer.mergeNewParams({viewparams: ...) to change the url, now i want to change just the sld

thanks



--------------------------------------------------------------------------------


_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110528/1dee05c5/attachment.htm 


More information about the Users mailing list