Hello guys...<br><br>I´m getting that error when use Google maps as my base layer:<br>Error: &#39;null&#39; is null or not an object<br><br>Method :<br> zoomToExtent: function(bounds, closest) {<br> var center = bounds.getCenterLonLat();  &lt;======== Error, bounds null<br>
<br><br>My code:<br>Ext.onReady(function() {<br> map = new OpenLayers.Map(&#39;Map&#39;, {      <br>        projection:new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>        units: &quot;m&quot;,     <br>        displayProjection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>
        tileSize: new OpenLayers.Size(400, 400),<br>         maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),      <br>        numZoomLevels: 10<br>    });   <br><br><br> viewport = new Ext.Viewport({<br>
        forceFit: true,<br>        hideMode: &quot;offsets&quot;,<br>        layout: &quot;border&quot;,<br>        hideBorders: true,<br>        items: [<br>            {<br>                id: &#39;page-header-panel&#39;,<br>
                region: &quot;north&quot;,<br>                contentEl: &quot;divMenu&quot;,<br>                height: 87<br>            },     <br>            {<br>                id: &#39;page-center&#39;,<br>                region: &#39;center&#39;,<br>
                layout: &#39;fit&#39;,<br>                frame: false,<br>                border: false,<br>                margins: &#39;5 2 2 0&#39;,<br>                items: [CreateMapPanel(map)]<br>            }<br>
       ]<br>    });<br><br>});<br><br><br>CreateMapPanel = function(__map) {<br>    var _mapfile = GetMapFileLocation();  <br>           <br>   var _google = new OpenLayers.Layer.Google(&quot;Google Physical&quot;,<br>         {<br>
            &#39;type&#39;: G_PHYSICAL_MAP,<br>            maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),<br>           &#39;sphericalMercator&#39;: true<br>         }<br>    );     <br>
   <br>   //Overlay<br>    var _testOverlay= new OpenLayers.Layer.WMS(&quot;TestOverlay&quot;,<br>                _mapfile, {<br>                    &quot;LAYERS&quot;: [&#39;TestOverlay&#39;],<br>                    transparent: true,                  <br>
                    format: &quot;image/png&quot;<br>                }, {<br>                    isBaseLayer: false,<br>                    tileSize: new OpenLayers.Size(400,400),<br>                    buffer: 0,<br>                    visibility: true                    <br>
                });       <br>  <br>    return new GeoExt.MapPanel({<br>        border: true,<br>        region: &quot;center&quot;,<br>        xtype: &quot;gx_mappanel&quot;,<br>        tbar: MakeToolBar(__map),<br>        map: __map,<br>
        zoom: 1,<br>        layers: [_google,_testOverlay]<br>    });<br>}<br><br>