<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi, If anyone can help would be greatly appreciated i have been have difficulties displaying my map in Open Layers for little while now.<BR>
&nbsp;<BR>
I have a map file (uk.map) pulling in one layer which is a .shp file consisting of .tiff files i created using FWTools.<BR>
&nbsp;<BR>
However i call the .map file from my html page and the map <BR>
will not display in openlayers just a blank screen within the<BR>
Open Layers Window. Can anyone see where i am going wrong?<BR>
&nbsp;<BR>
Here is my map file<BR>
&nbsp;<BR>
MAP<BR>&nbsp; NAME ukmap<BR>&nbsp; STATUS ON<BR>&nbsp; IMAGETYPE PNG<BR>&nbsp; IMAGECOLOR 153 204 255<BR>&nbsp; # Map image size<BR>&nbsp; SIZE 800 800<BR>&nbsp; UNITS METERS<BR>&nbsp; EXTENT -888385.321101 -31000.000000 1548385.321101 1271000.000000<BR>&nbsp; PROJECTION<BR>&nbsp; "AUTO"<BR>&nbsp; END<BR>
&nbsp; # Background color for the map canvas -- change as desired<BR>&nbsp; IMAGECOLOR 192 192 192<BR>&nbsp; IMAGEQUALITY 95<BR>&nbsp; IMAGETYPE gif<BR>&nbsp; OUTPUTFORMAT<BR>&nbsp;&nbsp;&nbsp; NAME gif<BR>&nbsp;&nbsp;&nbsp; DRIVER 'GD/GIF'<BR>&nbsp;&nbsp;&nbsp; MIMETYPE 'image/gif'<BR>&nbsp;&nbsp;&nbsp; #IMAGEMODE PC256<BR>&nbsp;&nbsp;&nbsp; EXTENSION 'gif'<BR>&nbsp; END<BR>&nbsp; # Legend<BR>&nbsp; LEGEND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGECOLOR 255 255 255<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; KEYSIZE 18 12<BR>&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE BITMAP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE MEDIUM<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 89<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; END<BR>
&nbsp; # Web interface definition. Only the template parameter<BR>&nbsp; # is required to display a map. See MapServer documentation<BR>&nbsp; WEB<BR>&nbsp;&nbsp;&nbsp; # Set IMAGEPATH to the path where MapServer should<BR>&nbsp;&nbsp;&nbsp; # write its output.<BR>&nbsp;&nbsp;&nbsp; IMAGEPATH '/tmp/'<BR>
&nbsp;&nbsp;&nbsp; # Set IMAGEURL to the url that points to IMAGEPATH<BR>&nbsp;&nbsp;&nbsp; # as defined in your web server configuration<BR>&nbsp;&nbsp;&nbsp; IMAGEURL '/tmp/'<BR>
&nbsp;&nbsp;&nbsp; # WMS server settings<BR>&nbsp;&nbsp;&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wms_title'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'ukmap'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wms_onlineresource'&nbsp; 'http://my.host.com/cgi-bin/mapserv?map=wms.map&amp;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wms_srs'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'EPSG:4326'<BR>&nbsp;&nbsp;&nbsp; END<BR>
&nbsp;&nbsp;&nbsp; #Scale range at which web interface will operate<BR>&nbsp;&nbsp;&nbsp; # Template and header/footer settings<BR>&nbsp;&nbsp;&nbsp; # Only the template parameter is required to display a map. See MapServer documentation<BR>&nbsp; END<BR>
&nbsp; LAYER<BR>&nbsp;&nbsp;&nbsp; NAME 'map'<BR>&nbsp;&nbsp;&nbsp; TYPE POLYGON<BR>&nbsp;&nbsp;&nbsp; DATA 'C:\ms4w\apps\openlayers-2.5\data\map.shp'<BR>&nbsp;&nbsp;&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wms_title' 'map'<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; STATUS DEFAULT<BR>&nbsp;&nbsp;&nbsp; TRANSPARENCY 100<BR>&nbsp;&nbsp;&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; 'proj=longlat'<BR>&nbsp;&nbsp;&nbsp; 'ellps=WGS84'<BR>&nbsp;&nbsp;&nbsp; 'datum=WGS84'<BR>&nbsp;&nbsp;&nbsp; 'no_defs'<BR>&nbsp;&nbsp;&nbsp; ''<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 'map' <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 0 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 2 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 144 50 207<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; END<BR>
END<BR>
&nbsp;<BR>
And my html page:<BR>
&nbsp;<BR>
&lt;html xmlns="<A href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"&gt;<BR>&nbsp; &lt;head&gt;&lt;B&gt;&lt;i&gt;NARIMS MAPPING TEST&lt;/i&gt;&lt;/B&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;style type="text/css"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #map {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width: 800px;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height: 475px;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border: 1px solid black;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; &lt;/style&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;script src="../lib/OpenLayers.js"&gt;&lt;/script&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;script type="text/javascript"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; var lon = 5;<BR>&nbsp;&nbsp;&nbsp;&nbsp; var lat = 40;<BR>&nbsp;&nbsp;&nbsp;&nbsp; var zoom = 1;<BR>&nbsp;&nbsp;&nbsp;&nbsp; var bounds = new OpenLayers.Bounds(-888385.321101, -31000.000000, 1548385.321101, 1271000.000000);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; var map, layer;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function init(){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map('map', {maxExtent: bounds});<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.PanZoomBar());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.MouseToolbar());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.MousePosition());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.OverviewMap());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<A href="http://127.0.0.1/cgi-bin/mapserv.exe">http://127.0.0.1/cgi-bin/mapserv.exe</A>", { layers: 'basic', map: 'c:/ms4w/apps/openlayers-2.5/data/uk.map' }, { gutter: 15 });&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(layer);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.zoomToExtent(bounds);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp; &lt;/script&gt;<BR>&nbsp; &lt;/head&gt;<BR>&nbsp; &lt;body onload="init()"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div id="map"&gt;&lt;/div&gt;<BR>&nbsp; &lt;/body&gt;<BR>&lt;/html&gt;<BR>
&nbsp;<BR>
&nbsp;<BR>
Any help much appreciated. Thanks in advance<BR><BR>
&nbsp;<BR>
&nbsp;<BR><br /><hr />
Upgrade to Internet Explorer 8 Optimised for MSN. <a href='http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U' target='_new'>Download Now</a></body>
</html>