[OpenLayers-Users] Select layer style
Eric Lemoine
eric.lemoine at camptocamp.com
Wed Aug 5 00:41:44 EDT 2009
On Wednesday, August 5, 2009, Eric Lemoine <eric.lemoine at camptocamp.com> wrote:
> On Wednesday, August 5, 2009, Raul David Orozco <hagen1113 at yahoo.com> wrote:
>> I'm here again asking for help.
>> I need to create somekind of style selector for my layers, I've an style associated for each layer and I want to make possible associate more than one style to a layer, but I don't know if with OL I can send some tag in GetMap request to indicate to the WMS server which style to use with the layer. Thanks a lot again to anyone who can help me.
>
> Hi. Yoy can provide (named) styles the same way you provide layers:
>
> new OpenLayers.Layer.WMS("name", url, {
> layers: "layername", styles: "stylename"
> });
And if you want to change style afterwards do
layer.mergeNewParams({styles: "newstylename"});
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list