<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=593322620-13092008><FONT face=Arial
color=#0000ff size=2>To change the parameter of a WMS layer you can use
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=593322620-13092008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=593322620-13092008><FONT face=Arial
color=#0000ff size=2>ruta22.mergeNewParams({ 'layers' : layer1
});</FONT></SPAN></DIV>
<DIV><SPAN class=593322620-13092008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=593322620-13092008><FONT><FONT face=Arial color=#0000ff
size=2>I'm not sure, if you can use it also for MapServer layers.</FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=593322620-13092008></SPAN><FONT face=Arial
color=#0000ff size=2>A<SPAN class=593322620-13092008>rnd
Wippermann</SPAN><BR></FONT></DIV></FONT></SPAN>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von
</B>davyd<BR><B>Gesendet:</B> Samstag, 13. September 2008 18:10<BR><B>An:</B>
OpenLayers<BR><B>Betreff:</B> [OpenLayers-Users] Layer with Parameter
..<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Hi List,<BR><BR>I'm working with OpenLayers 2.6 and I need to
create a Layer, where the name of the layer is on a JavaScript
variable...<BR><BR>Like this:<BR><BR> This
is my normal layer :<BR><BR>
var ruta22 = new OpenLayers.Layer.MapServer.Untiled( "Ruta
22", "../../cgi-bin/mapserv",<BR>
{map:"C:/data/publicacion.map", transparent: "true",
<BR> layers:
<B>"ruta22_ida"</B>,map_imagetype: "png"},{"isBaseLayer": false},
{"displayInLayerSwitcher":false});<BR><BR> And here I wanto to
create my layer where the name "ruta22_ida" is on a
variable.<BR><BR><BR>
var layer1 = document.pos_recorridos.layertxt.value;<BR>
alert(layer1);<BR><BR>
var ruta8 = new
OpenLayers.Layer.MapServer.Untiled( "Ruta 8",
"../../cgi-bin/mapserv",<BR>
{map:"C:/data/publicacion.map", <BR>
layers: <B>layer1</B> ,transparent:
"true", map_imagetype: "png"});<BR><BR><BR>I hope your
help...<BR><BR>Thanks..! David<BR></DIV></BODY></HTML>