<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thanks for your reply.<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
I have set&nbsp;up the IMAGEPATH and IMAGE URL as you have suggested and i can now view the outline of my map however it is in red.&nbsp;As you suggested is is probably my projection which i causing this. Any ideas what the correct projection setting might be?<BR>
&nbsp;<BR>
Thanks again<BR>
&nbsp;<BR>
Paul<BR>
&nbsp;<BR>&gt; Date: Mon, 13 Jul 2009 08:17:21 -0600<BR>&gt; From: bfraser@geoanalytic.com<BR>&gt; To: paul_everton@hotmail.com<BR>&gt; CC: mapserver-users@lists.osgeo.org<BR>&gt; Subject: Re: [mapserver-users] .map file wont display in Open Layers<BR>&gt; <BR>&gt; Paul,<BR>&gt; <BR>&gt; You may need to define your output projection instead of using "AUTO" (I <BR>&gt; didn't know mapserver would tolerate that in the MAP section!).<BR>&gt; <BR>&gt; <BR>&gt; And IMAGEPATH is the file-system path to a folder writable by mapserver. Here's <BR>&gt; an example using standard ms4w:<BR>&gt; <BR>&gt; IMAGEPATH '\ms4w\tmp\ms_tmp\'<BR>&gt; <BR>&gt; with IMAGEURL being its web-based equivalent (the same location on disk but <BR>&gt; access via your web server):<BR>&gt; <BR>&gt; IMAGEURL '\ms_tmp\'<BR>&gt; <BR>&gt; since "ms_tmp" is set as an alias in Apache's httd.conf:<BR>&gt; <BR>&gt; Alias /ms_tmp/ "C:/ms4w/tmp/ms_tmp/"<BR>&gt; <BR>&gt; <BR>&gt; Best Regards,<BR>&gt; Brent Fraser<BR>&gt; <BR>&gt; <BR>&gt; Paul Curran wrote:<BR>&gt; &gt; Hi, If anyone can help would be greatly appreciated i have been have <BR>&gt; &gt; difficulties displaying my map in Open Layers for little while now.<BR>&gt; &gt; <BR>&gt; &gt; I have a map file (uk.map) pulling in one layer which is a .shp file <BR>&gt; &gt; consisting of .tiff files i created using FWTools.<BR>&gt; &gt; <BR>&gt; &gt; However i call the .map file from my html page and the map<BR>&gt; &gt; will not display in openlayers just a blank screen within the<BR>&gt; &gt; Open Layers Window. Can anyone see where i am going wrong?<BR>&gt; &gt; <BR>&gt; &gt; Here is my map file<BR>&gt; &gt; <BR>&gt; &gt; MAP<BR>&gt; &gt; NAME ukmap<BR>&gt; &gt; STATUS ON<BR>&gt; &gt; IMAGETYPE PNG<BR>&gt; &gt; IMAGECOLOR 153 204 255<BR>&gt; &gt; # Map image size<BR>&gt; &gt; SIZE 800 800<BR>&gt; &gt; UNITS METERS<BR>&gt; &gt; EXTENT -888385.321101 -31000.000000 1548385.321101 1271000.000000<BR>&gt; &gt; PROJECTION<BR>&gt; &gt; "AUTO"<BR>&gt; &gt; END<BR>&gt; &gt; # Background color for the map canvas -- change as desired<BR>&gt; &gt; IMAGECOLOR 192 192 192<BR>&gt; &gt; IMAGEQUALITY 95<BR>&gt; &gt; IMAGETYPE gif<BR>&gt; &gt; OUTPUTFORMAT<BR>&gt; &gt; NAME gif<BR>&gt; &gt; DRIVER 'GD/GIF'<BR>&gt; &gt; MIMETYPE 'image/gif'<BR>&gt; &gt; #IMAGEMODE PC256<BR>&gt; &gt; EXTENSION 'gif'<BR>&gt; &gt; END<BR>&gt; &gt; # Legend<BR>&gt; &gt; LEGEND<BR>&gt; &gt; IMAGECOLOR 255 255 255<BR>&gt; &gt; STATUS ON<BR>&gt; &gt; KEYSIZE 18 12<BR>&gt; &gt; LABEL<BR>&gt; &gt; TYPE BITMAP<BR>&gt; &gt; SIZE MEDIUM<BR>&gt; &gt; COLOR 0 0 89<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt; # Web interface definition. Only the template parameter<BR>&gt; &gt; # is required to display a map. See MapServer documentation<BR>&gt; &gt; WEB<BR>&gt; &gt; # Set IMAGEPATH to the path where MapServer should<BR>&gt; &gt; # write its output.<BR>&gt; &gt; IMAGEPATH '/tmp/'<BR>&gt; &gt; # Set IMAGEURL to the url that points to IMAGEPATH<BR>&gt; &gt; # as defined in your web server configuration<BR>&gt; &gt; IMAGEURL '/tmp/'<BR>&gt; &gt; # WMS server settings<BR>&gt; &gt; METADATA<BR>&gt; &gt; 'wms_title' 'ukmap'<BR>&gt; &gt; 'wms_onlineresource' <BR>&gt; &gt; 'http://my.host.com/cgi-bin/mapserv?map=wms.map&amp;'<BR>&gt; &gt; 'wms_srs' 'EPSG:4326'<BR>&gt; &gt; END<BR>&gt; &gt; #Scale range at which web interface will operate<BR>&gt; &gt; # Template and header/footer settings<BR>&gt; &gt; # Only the template parameter is required to display a map. See <BR>&gt; &gt; MapServer documentation<BR>&gt; &gt; END<BR>&gt; &gt; LAYER<BR>&gt; &gt; NAME 'map'<BR>&gt; &gt; TYPE POLYGON<BR>&gt; &gt; DATA 'C:\ms4w\apps\openlayers-2.5\data\map.shp'<BR>&gt; &gt; METADATA<BR>&gt; &gt; 'wms_title' 'map'<BR>&gt; &gt; END<BR>&gt; &gt; STATUS DEFAULT<BR>&gt; &gt; TRANSPARENCY 100<BR>&gt; &gt; PROJECTION<BR>&gt; &gt; 'proj=longlat'<BR>&gt; &gt; 'ellps=WGS84'<BR>&gt; &gt; 'datum=WGS84'<BR>&gt; &gt; 'no_defs'<BR>&gt; &gt; ''<BR>&gt; &gt; END<BR>&gt; &gt; CLASS<BR>&gt; &gt; NAME 'map'<BR>&gt; &gt; STYLE<BR>&gt; &gt; SYMBOL 0<BR>&gt; &gt; SIZE 2<BR>&gt; &gt; OUTLINECOLOR 0 0 0<BR>&gt; &gt; COLOR 144 50 207<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt; <BR>&gt; &gt; And my html page:<BR>&gt; &gt; <BR>&gt; &gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<BR>&gt; &gt; &lt;head&gt;&lt;B&gt;&lt;i&gt;NARIMS MAPPING TEST&lt;/i&gt;&lt;/B&gt;<BR>&gt; &gt; &lt;style type="text/css"&gt;<BR>&gt; &gt; #map {<BR>&gt; &gt; width: 800px;<BR>&gt; &gt; height: 475px;<BR>&gt; &gt; border: 1px solid black;<BR>&gt; &gt; }<BR>&gt; &gt; &lt;/style&gt;<BR>&gt; &gt; &lt;script src="../lib/OpenLayers.js"&gt;&lt;/script&gt;<BR>&gt; &gt; &lt;script type="text/javascript"&gt;<BR>&gt; &gt; <BR>&gt; &gt; var lon = 5;<BR>&gt; &gt; var lat = 40;<BR>&gt; &gt; var zoom = 1;<BR>&gt; &gt; var bounds = new OpenLayers.Bounds(-888385.321101, -31000.000000, <BR>&gt; &gt; 1548385.321101, 1271000.000000); <BR>&gt; &gt; var map, layer;<BR>&gt; &gt; <BR>&gt; &gt; function init(){<BR>&gt; &gt; map = new OpenLayers.Map('map', {maxExtent: bounds});<BR>&gt; &gt; map.addControl(new OpenLayers.Control.PanZoomBar());<BR>&gt; &gt; map.addControl(new OpenLayers.Control.MouseToolbar());<BR>&gt; &gt; map.addControl(new OpenLayers.Control.MousePosition());<BR>&gt; &gt; map.addControl(new OpenLayers.Control.OverviewMap());<BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS",<BR>&gt; &gt; "http://127.0.0.1/cgi-bin/mapserv.exe", { layers: 'basic', map: <BR>&gt; &gt; 'c:/ms4w/apps/openlayers-2.5/data/uk.map' }, { gutter: 15 }); <BR>&gt; &gt; map.addLayer(layer);<BR>&gt; &gt; map.zoomToExtent(bounds);<BR>&gt; &gt; map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); <BR>&gt; &gt; <BR>&gt; &gt; }<BR>&gt; &gt; &lt;/script&gt;<BR>&gt; &gt; &lt;/head&gt;<BR>&gt; &gt; &lt;body onload="init()"&gt;<BR>&gt; &gt; &lt;div id="map"&gt;&lt;/div&gt;<BR>&gt; &gt; &lt;/body&gt;<BR>&gt; &gt; &lt;/html&gt;<BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; Any help much appreciated. Thanks in advance<BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; Upgrade to Internet Explorer 8 Optimised for MSN. Download Now <BR>&gt; &gt; &lt;http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U&gt;<BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; <BR>&gt; &gt; _______________________________________________<BR>&gt; &gt; mapserver-users mailing list<BR>&gt; &gt; mapserver-users@lists.osgeo.org<BR>&gt; &gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users<BR><br /><hr />View your Twitter and Flickr updates from one place – <a href='http://clk.atdmt.com/UKM/go/137984870/direct/01/' target='_new'>Learn more!</a></body>
</html>