<p>Thanks for the response.<br> <br>My layers are currently set to ON but as i have mentioned this results in my layers not being displayed (WMSLoadGetMapParams():WMS server error is shown repeatedly within the OL map window). If layer is DEFAULT it is shown fine but i then cannot hide the layer. My map looks as follows:<br>
<br>MAP<br> <br> NAME UK1<br> PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br> 'no_defs'<br> ''<br> END <br> SIZE 1600 1200<br> IMAGECOLOR -1 -1 -1<br>
IMAGETYPE JPEG<br> SHAPEPATH "<a href="http://localhost/openlayers/data/">http://localhost/openlayers/data/</a>"<br> #QGIS<br> #EXTENT -837824 -111116 1677552 1232884<br> #Port Talbot <br> #EXTENT 272000 187000 278000 193000<br>
#UK <br> EXTENT 0 0 660046 1240000<br> UNITS METERS<br> <br> <br> WEB<br> TEMPLATE "<a href="http://localhost/openlayers/examples/zoomlevelsuktest2.html">http://localhost/openlayers/examples/zoomlevelsuktest2.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=uk2.map">http://127.0.0.1./cgi-bin/mapserv?map=uk2.map</a>"<br>
END<br> END<br> LAYER<br> <br> NAME "UK250"<br> METADATA<br> 'wms_title' "wms_demo"<br> END<br> STATUS ON<br> TYPE raster<br> TILEINDEX "250K"<br> TILEITEM "Location"<br>
PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br> 'no_defs'<br> ''<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> <br> END<br> <br> LAYER<br> <br> NAME "UK"<br> METADATA<br> 'wms_title' "wms_demo"<br> END<br>
STATUS ON<br> TYPE raster<br> TILEINDEX "map"<br> TILEITEM "Location"<br> PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br> 'no_defs'<br>
''<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> <br> END<br> <br> <br> <br>END<br>
<br>And my openlayers code as follows:<br> <br><html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br> <head>MAPPING TEST<br> <style type="text/css"><br>
#map {<br> width: 90%;<br> height: 90%;<br> border: 8px solid black;<br> }<br> </style><br> <script src="../lib/OpenLayers.js"></script><br>
<script type="text/javascript"><br> <br> <br> var bounds = new OpenLayers.Bounds(0, 0, 660046, 1229782);<br> var map, layer1, layer2;</p>
<p> var options = { maxExtent: bounds, maxResolution: 600, numZoomLevels: 10};<br> <br> <br> function init(){<br> map = new OpenLayers.Map('map', options);<br> layer1 = new OpenLayers.Layer.WMS("OpenLayers WMS",</p>
<p> "<a href="http://127.0.0.1/cgi-bin/mapserv.exe">http://127.0.0.1/cgi-bin/mapserv.exe</a>?", { layers: "UK250", map: '/ms4w/apps/openlayers-2.5/data/uk2.map' },</p>
<p> { gutter: 15, minZoomLevel: 1, maxZoomLevel: 4 });</p>
<p> layer2 = new OpenLayers.Layer.WMS("OpenLayers WMS",</p>
<p> "<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/uk2.map' },<br> { gutter: 15, minZoomLevel: 5, maxZoomLevel: 10 });<br>
<br> map.addLayer(layer1, layer2);</p>
<p> map.zoomToExtent(bounds);<br> map.setCenter(bounds);<br> map.zoomToMaxExtent();<br> map.addControl(new OpenLayers.Control.PanZoomBar());<br> map.addControl(new OpenLayers.Control.MousePosition());<br>
}<br> <br> </script><br> </head><br> <body onload="init()"><br> <div id="map"></div><br> </body><br></html><br> <br>Thanks for any help in advance</p>