[OpenLayers-Users] Layer with Parameter ..
davyd
davydky at gmail.com
Sat Sep 13 12:09:47 EDT 2008
Hi List,
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...
Like this:
This is my normal layer :
var ruta22 = new OpenLayers.Layer.MapServer.Untiled( "Ruta 22",
"../../cgi-bin/mapserv",
{map:"C:/data/publicacion.map", transparent: "true",
layers: *"ruta22_ida"*,map_imagetype: "png"},{"isBaseLayer":
false}, {"displayInLayerSwitcher":false});
And here I wanto to create my layer where the name "ruta22_ida" is on a
variable.
var layer1 = document.pos_recorridos.layertxt.value;
alert(layer1);
var ruta8 = new OpenLayers.Layer.MapServer.Untiled( "Ruta 8",
"../../cgi-bin/mapserv",
{map:"C:/data/publicacion.map",
layers: *layer1* ,transparent: "true", map_imagetype: "png"});
I hope your help...
Thanks..! David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080913/339a19a2/attachment.html
More information about the Users
mailing list