<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:Arial, sans-serif;font-size:12pt;color:#000000;"><DIV>I'm here again with mi newbie questions. I've been dealing with this issue for a long time and I can't fix it no matter how hard I try.</DIV><DIV>I need to make OL set an initial coordinates and zoom so when I open the browser the map stars in some specific part of the world. <BR></DIV><DIV>I've done it perfectly with an example doing this:</DIV><DIV></DIV><DIV>var options = {<BR>                         minResolution: "auto",<BR>                         minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),<BR>                         maxResolution: "auto",<BR>                         maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90)<BR>                   };<BR><BR>            map = new OpenLayers.Map( 'map' , options);<BR><BR><BR>            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",<BR><SPAN>                    "<A target="_blank"
 href="http://labs.metacarta.com/wms/vmap0">http://labs.metacarta.com/wms/vmap0</A>", {layers: 'basic'});</SPAN><BR>            map.addLayer(layer);<BR><BR>            map.setCenter(new OpenLayers.LonLat(-73, 3), 3);</DIV><DIV></DIV><DIV>And it works just the way I want, but when I do this with my map:</DIV><DIV></DIV><DIV></DIV><DIV>var options = {<BR>                            minResolution: "auto",<BR>                            minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),<BR>                            maxResolution: "auto",<BR>                            maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90)<BR>                 };<BR><BR>           var map = new OpenLayers.Map( 'map' , options);<BR><BR>  <BR>                 var request = OpenLayers.Request.GET(<BR>                 {url: "dir/smms/wms.php?VERSION=1.1.1&amp;REQUEST=GetCapabilities&amp;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&lt;cap.capability.layers.length; i++) {<BR>                                                         layer = cap.capability.layers[i];<BR>                                                                                 layers_array[i] = new OpenLayers.Layer.WMS( layer.name, <BR>                                            "dir/smms/wms.php", <BR>                                            {'layers': layer.name, format: "image/png"}<BR>                                            );<BR>                                                                                                                                           <BR>                                                  <BR>                                                         map.addLayer(layers_array[i]);<BR>                                                 }<BR>                                                         },<BR>                         failure: function(response){<BR>                                                 alert(response.status);<BR>                                                 alert("GetCapabilities failed");<BR>                                                         }<BR>                 }); <BR>                                  <BR>                 map.setCenter(new OpenLayers.LonLat(-73, 3), 3);<BR></DIV><DIV></DIV><DIV></DIV><DIV>IT DOESN'T WORK, I get the error :
 maxExtent is null. What can I do??? I hope somebody can help me.<BR><BR></DIV></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>