<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>zooming to fit the full earth using google maps layers</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>I have a map that uses the google earth hybrid layer as the base layer. I would like it so the map is initially zoomed to show the whole world, but I can't quite figure out how.<BR>
<BR>
My code looks like<BR>
var map = new OpenLayers.Map({<BR>
 div: "map",<BR>
 projection: 'EPSG:3857',<BR>
 layers: [<BR>
    new OpenLayers.Layer.Google("Google Hybrid",{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20})<BR>
  ],<BR>
  center: new OpenLayers.LonLat(0,0).transform('EPSG:4326', 'EPSG:3857')<BR>
});<BR>
<BR>
map.zoomToMapExtent();<BR>
<BR>
Do I need to set the map div dimensions to a particular aspect ratio (or a minimum height/width)?<BR>
<BR>
Also, is there a way to prevent the user from panning when zoomed out all the way?<BR>
<BR>
Thanks,<BR>
Jeff<BR>
</FONT>
</P>

</BODY>
</HTML>