Hi,

what about

fires_24h.mergeNewParams({sld: './SLD/my_new.sld'});

This requires that my_new.sld is stored at the same location as fires.sld. Do 
you have that, or are you generating a new SLD on the fly in OpenLayers and 
store it back to the server? If so, you have to wait for the server's response 
before issuing mergeNewParams.

Regards,
Andreas.

On Aug 12, 2010, at 10:27 , Fernando Ribeiro wrote:

> Hi list,
> 
> I am trying to change the default style of a WMS layer, with a new SLD style. 
> So far I tried the "SLD:", direcly on layer options, and 
> layer.mergeNewParams, without much success.
> 
> Here's the layer I want to change:
> 
> var fires_24h = new OpenLayers.Layer.WMS( 
>             "Fires 24h",  
>             "http://firefly.geog.umd.edu/wms/wms?";,  
>             { 
>                 layers: 'fires24',
>                 sld: './SLD/fires.sld', 
>                 srs: 'EPSG:4326', 
>                 format: 'image/png', 
>                 tiled: 'true', 
>                 transparent: true 
>             }, 
>             {isBaseLayer: false} 
>         );
> 
> Can anyone try and help me?
> 
> Thank you!
> 
> -- 
> Fernando
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to