<br><br>On Friday, February 10, 2012, Lawrence Miller &lt;<a href="mailto:lawrence.miller@noaa.gov">lawrence.miller@noaa.gov</a>&gt; wrote:<br>&gt; I am trying to load a basemap and layers into a 696x425 frame. The map won&#39;t appear in the center of the frame, it appears centered low and to the left. I can drag the map into the correct location, but I would prefer it just appear there. Any suggestions?<br>
&gt;  <br>&gt; my script:<br>&gt;       &lt;div style=&quot;width:696px; height: 425px; border: 1px solid;&quot; id=&quot;map&quot;&gt;&lt;/div&gt;<br>&gt;       &lt;script defer=&quot;defer&quot; type=&quot;text/javascript&quot;&gt;<br>
<br>What if you create the map in an onload callback function as in the OpenLayers examples?<br><br><br>&gt;         var options = {<br>&gt;             maxExtent: new OpenLayers.Bounds(0,0,1410,913),<br>&gt;             maxResolution: &quot;auto&quot;<br>
&gt;         };<br>&gt;         var map = new OpenLayers.Map(&#39;map&#39;,options);<br>&gt;         var base = new OpenLayers.Layer.Image(&quot;Basemap&quot;,<br>&gt;              &quot;newestbasemap.gif&quot;,<br>&gt;              new OpenLayers.Bounds(0,0,1410,913),<br>
&gt;              new OpenLayers.Size(1410,913),<br>&gt;              {isBaseLayer: true}<br>&gt;              );<br>&gt;         var ice = new OpenLayers.Layer.Image(&quot;Freezing Level&quot;,<br>&gt;              &quot;pt3.gif&quot;,<br>
&gt;              new OpenLayers.Bounds(0,0,1410,913),<br>&gt;              new OpenLayers.Size(1410,913),<br>&gt;               {isBaseLayer: false,<br>&gt;                visibility: false,<br>&gt;                opacity: 0.80}<br>
&gt;              );<br>&gt;         var wind = new OpenLayers.Layer.Image(&quot;Wind Speed&quot;,<br>&gt;              &quot;pt3windspd.gif&quot;,<br>&gt;              new OpenLayers.Bounds(0,0,1410,913),<br>&gt;              new OpenLayers.Size(1410,913),<br>
&gt;               {isBaseLayer: false,<br>&gt;                visibility: false,<br>&gt;                opacity: 0.60}<br>&gt;              );<br>&gt;         var turb = new OpenLayers.Layer.Image(&quot;Turbulence&quot;,<br>
&gt;              &quot;pt3turb.gif&quot;,<br>&gt;              new OpenLayers.Bounds(0,0,1410,913),<br>&gt;              new OpenLayers.Size(1410,913),<br>&gt;               {isBaseLayer: false,<br>&gt;                visibility: false,<br>
&gt;                opacity: 0.60}<br>&gt;              );<br>&gt;         map.addLayers([base, ice, wind, turb]);<br>&gt;         map.setCenter(new OpenLayers.LonLat(705,456));<br>&gt;         map.zoomToMaxExtent();<br>&gt;         map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
&gt;       &lt;/script&gt;<br><br>-- <br>Eric Lemoine<br><br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex<br><br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com">http://www.camptocamp.com</a><br><br>