<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt">I made a modification, now I have an empty as base layer (which I plan to replace later with a world layer but hosted local in my WMS) but still with no results. I tried the setallOverlays option too. Here is my code. Thanks again.<br><br>var request = OpenLayers.Request.GET(<br> {url: "dir/wms.php?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS",<br> success: function(response){<br> var XMLformat = new OpenLayers.Format.XML();<br>
var xml = XMLformat.read(response.responseText);<br> var CAPformat = new OpenLayers.Format.WMSCapabilities();<br> var cap = CAPformat.read(xml);<br> <br> for (var i=0; i<cap.capability.layers.length; i++) {<br> layer = cap.capability.layers[i];<br>
<br> if(layer.name == 'OCG:WMS'){<br> layers_array[i] = new OpenLayers.Layer.WMS( layer.name, <br> "dir/wms.php",
<br> {'layers': layer.name, isBaseLayer:true, format: "image/png", 'viewer': 'OpenLayers'}<br> );<br> }<br>
else{<br> layers_array[i] = new OpenLayers.Layer.WMS( layer.name, <br> "dir/wms.php", <br> {'layers': layer.name, transparent: "true", format: "image/png", 'viewer': 'OpenLayers'}<br>
);<br> }<br> <br> <br>
map.addLayer(layers_array[i]);<br> }<br> <br> },<br> failure: function(response){<br> alert(response.status);<br> alert("GetCapabilities
failed");<br> }<br> }); <br><!-- cg32.c2.mail.ac4.yahoo.com compressed/chunked Tue Jan 12 12:44:41 PST 2010 -->
</div><br>
<hr size=1><br><font face="Verdana" size="-2">ˇObtén la mejor experiencia en la web!<br>Descarga gratis el nuevo Internet Explorer 8<br>
http://downloads.yahoo.com/ieak8/?l=e1</font></body></html>