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
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users