[Users] Change Opacity of a layer in a group layer

Andreas Hocevar ahocevar at opengeo.org
Sun Jun 24 11:20:10 CEST 2012


To achieve this, you have to use a style that uses opacity on the server
side.

Andreas.
On Jun 21, 2012 7:56 PM, "julia paredes" <japr94 at hotmail.com> wrote:

>  Hi all,
>
> If I have a group layer definition such as the following :
>
> var Test = new OpenLayers.Layer.WMS(
>                  "Group Layer", mapserverUrl,
>                 {
>                     map: "C:/Users/Administrator/map.map",
>                     layers: [
>                         "First",
>                         "Second",
>                         "Third"
>                      ],
>                     format: "image/png",
>                     transparent: "true"
>                 }
>                 ,
>                 {
>                     isBaseLayer: false,
>                     visibility: false,
>                     opacity: opa
>                 }
>                 );
>
> Is there a way I could change the opacity of just one of the layers
> belonging to the group layer?
> Before adding a group layer I was using jquery to add a slider and a drop
> down menu to select a layer to change the opacity.
> I am not sure if the layer opacity slider provided by GeoExt will make
> this easier or if there is a way to access a particular layer in the group
> layer by doing something like Test.layers[0]
>
> Any ideas?
>
> Thanks in advance
>
> _______________________________________________
> 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/20120624/4e38cc4e/attachment.htm 


More information about the Users mailing list