Hi all,<br><br>I am working from the Image Layer Example:<br><a href="http://openlayers.org/dev/examples/image-layer.html">http://openlayers.org/dev/examples/image-layer.html</a><br><br>Goal is to switch to an image layer showing a picture (e.g. of a Church).<br>

I managed to switch from the original map to the image layer using map.setBaseLayer(image-layer);<br>
<br>Problem is how to calculate OpenLayers.Bounds?<br>Simply replacing<br>   new OpenLayers.Bounds(-180, -88.759, 180, 88.759),<br>by<br>  new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34)<br>did not work.<br>

(It just blows up a single pixel to cover the whole map-div.)<br><br>And even when the example states:<br>...&quot;If you construct it without any resolution related options [Does this mean Bounds???],
            the layer will be given a single resolution based on the extent/size.&quot;...<br>Commenting out the &quot;new OpenLayers.Bounds( ...&quot; line does not work, it just gives an error in both OL 2.7 and 2.8:<br>

<pre id="line13">this.extent.getHeight is not a function<br><a href="http://localhost/js/OpenLayers.js">http://localhost/js/OpenLayers.js</a><br>Line 1187<br><br>So how to calculate OpenLayers.Bounds to display the image at its original 100% size? <br>

Or to fit in the map-div?<br><br>Thanks,<br>Jan<br><br><br>Image Layer Example Code (Cleaned up a bit): <br></pre><pre id="line13">&lt;<span class="start-tag">script</span><span class="attribute-name"> type</span>=<span class="attribute-value">&quot;text/javascript&quot;</span>&gt;<br>

        var map;<br>        function init(){<br>            map = new OpenLayers.Map(&#39;map&#39;);<br><br>            var options = {numZoomLevels: 3};<br><br>            var graphic = new OpenLayers.Layer.Image(<br>                &#39;City Lights&#39;,<br>

                &#39;<a href="http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif">http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif</a>&#39;,<br>                new OpenLayers.Bounds(-180, -88.759, 180, 88.759),<br>

                new OpenLayers.Size(580, 288),<br>                options<br>            );<br>            <br>            var jpl_wms = new OpenLayers.Layer.WMS( &quot;NASA Global Mosaic&quot;,<br>                &quot;<a href="http://t1.hypercube.telascience.org/cgi-bin/landsat7">http://t1.hypercube.telascience.org/cgi-bin/landsat7</a>&quot;, <br>

                {layers: &quot;landsat7&quot;}, options);<br><br>            map.addLayers([graphic, jpl_wms]);<br>            map.addControl(new OpenLayers.Control.LayerSwitcher());<br>            map.zoomToMaxExtent();<br>

        }<br>    &lt;/<span class="end-tag">script</span>&gt;<br></pre>