[OpenLayers-Users] Changing the referenced SLD for a layer coming
from GeoServer
Andreas Hocevar
ahocevar at opengeo.org
Sat Feb 25 13:17:03 EST 2012
Try
rc.mergeNewParams({styles: 'DWT_RC_ILEC'});
Andreas.
On Fri, Feb 24, 2012 at 7:59 PM, Kjel Anderson
<kanderson at truevectortech.com> wrote:
> Hey Everyone,
>
> I've got a layer that looks like this:
>
> rc = new OpenLayers.Layer.WMS(
> "ratecenter_boundaries - Untiled",
> "http://localhost:8080/geoserver/wms",
> {
> layers: 'DWT:dwt_rc_boundaries_proj',
> styles: 'DWT_RC',
> transparent: true,
> height: '330',
> width: '2257',
> srs: ' EPSG:900913',
> format: format
> },
> {singleTile: true, ratio: 1}
> );
>
> And that gives me that layer with the polygons symbolized by category. I
> have a different SLD called DWT_RC_ILEC that I want to apply to the layer rc
> in response to an event. I'm wondering how I do that. I tried rc.style =
> 'DWT_RC_ILEC' but that doesn't seem to be it.
>
> Thanks,
>
> Kjel
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list