<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">Hi,</font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"> </font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">Been struggling with this problem for a little while now any help appreciated.</font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"> </font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">I can view my map of the UK fine via mapserver however when I view it via Openlayers I am zoomed in very close to the map (tree level). I am able to zoom in even closer (map becomes blurred) however i cannot zoom out. I only have one layer in the map file.</font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"> </font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">For my bounds I am using the extent from my map file</font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"> </font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">Here is my code</font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"> </font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span><b style="mso-bidi-font-weight: normal">var zoom = 10;</b></font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>var bounds = new OpenLayers.Bounds(0, 0, 660046, 1229782);</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>var map, layer;</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="mso-spacerun: yes"><font face="Times New Roman" size="3"> </font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="mso-spacerun: yes"><font face="Times New Roman" size="3"> </font></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>function init(){</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>map = new OpenLayers.Map('map', { <b style="mso-bidi-font-weight: normal">maxExtent: bounds, numZoomlevels: 10</b> });</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>map.addControl(new OpenLayers.Control.PanZoomBar());</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>map.addControl(new OpenLayers.Control.OverviewMap());</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>map.addControl(new OpenLayers.Control.MousePosition());</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span><span style="mso-spacerun: yes"> </span>layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", </font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>"<a href="http://127.0.0.1/cgi-bin/mapserv.exe">http://127.0.0.1/cgi-bin/mapserv.exe</a>?", { layers: 'uk', map: '/ms4w/apps/openlayers-2.5/data/uk1.map' },</font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>{ gutter: 15 });<span style="mso-spacerun: yes"> </span></font></font></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>map.addLayer(layer);</font></font></p>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span><b style="mso-bidi-font-weight: normal">map.zoomToExtent(bounds);</b></font></font></div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"><b style="mso-bidi-font-weight: normal"></b></font></font> </div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">Can anyone see where I am going wrong or have any suggestions?</font></div>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"> </font></p>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">Cheers, thanks for any help in advance</font></div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"></font> </div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">Paul</font></div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"></font> </div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3">p.s. My mapfile is here</font></div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font face="Times New Roman" size="3"></font> </div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">MAP<br> <br> NAME UK1<br> PROJECTION<br> "init=epsg:4326"<br> END <br> SIZE 1600 1200<br> IMAGECOLOR 153 204 255<br> IMAGETYPE JPEG<br> SHAPEPATH "<a href="http://localhost/openlayers/data/">http://localhost/openlayers/data/</a>"<br>
EXTENT 0 0 660046 1229782<br> UNITS DD<br> <br> <br> WEB<br> TEMPLATE "<a href="http://localhost/openlayers/examples/test.html">http://localhost/openlayers/examples/test.html</a>"<br> LOG "\ms4w\tmp\ms_tmp\log.txt"<br>
IMAGEPATH "\ms4w\tmp\ms_tmp\"<br> IMAGEURL "/ms_tmp/"<br> METADATA<br> 'wms_title' "map"<br> 'wms_onlineresource' "<a href="http://127.0.0.1./cgi-bin/mapserv?map=uk1.map">http://127.0.0.1./cgi-bin/mapserv?map=uk1.map</a>"<br>
END</div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> END</div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> LAYER<br> <br> NAME "UK"<br> METADATA<br> 'wms_title' "wms_demo"<br> END<br> STATUS DEFAULT<br> TYPE raster<br> TILEINDEX "map"<br>
TILEITEM "Location"<br> PROJECTION<br> "init=epsg:4326"<br> END<br> CLASS<br> STYLE<br> COLOR 0 0 0<br> END<br> LABEL<br> COLOR 0 0 0<br> SIZE SMALL<br>
END<br> <br> END<br> </div>
<div class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> END</div>