<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thanks for the quick reply.<BR>
&nbsp;<BR>
You mentioned adding a projection block to the layer.<BR>
&nbsp;<BR>
Is that done by the following:<BR>
&nbsp;<BR>
PROJECTION<BR>
&nbsp; "epsg:32119"<BR>
END<BR>
&nbsp;<BR>
Thanks again<BR>&nbsp;<BR>&gt; Date: Fri, 17 Jul 2009 13:22:04 +0200<BR>&gt; Subject: Re: [mapserver-users] Changing to Layers.WMS from Layers.Mapserver<BR>&gt; From: bartvde@osgis.nl<BR>&gt; To: paul_everton@hotmail.com<BR>&gt; CC: mapserver-users@lists.osgeo.org<BR>&gt; <BR>&gt; Hi,<BR>&gt; <BR>&gt; there are several things wrong here.<BR>&gt; <BR>&gt; 'wms_srs' "epsg: 32119 epsg: 4326"<BR>&gt; <BR>&gt; should be (uppercase EPSG for METADATA and no space in between):<BR>&gt; <BR>&gt; 'wms_srs' "EPSG:32119 EPSG:4326"<BR>&gt; <BR>&gt; however Mapserver cannot reproject your data if you do not add a<BR>&gt; PROJECTION block to your LAYER stating the projection in which your data<BR>&gt; resides.<BR>&gt; <BR>&gt; Also, in OpenLayers the syntax is (your map can only be in 1 projection):<BR>&gt; <BR>&gt; {projection: "EPSG:32119"}<BR>&gt; <BR>&gt; Best regards,<BR>&gt; Bart<BR>&gt; <BR>&gt; &gt;<BR>&gt; &gt; Hi, i am having trouble trying to display my map in Open Layers via<BR>&gt; &gt; OpenLayers.Layer.wms.<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; Firstly I Built a shape file of the UK as a raster tileindex. I can now<BR>&gt; &gt; view my map via "//localhost/cgi-bin/mapserv.exe/mymapfile.map" and the<BR>&gt; &gt; map looks fine.<BR>&gt; &gt; I am now trying to view my map via OpenLayers. Firstly I used<BR>&gt; &gt; Openlayers.Layer.MapServer which displayed my map however zoomed in very<BR>&gt; &gt; close. However I have read Layer.Mapserver should be avoided and Layer.WMS<BR>&gt; &gt; should be used instead.<BR>&gt; &gt;<BR>&gt; &gt; I attempted to amend both my map and openlayers files to display via WMS<BR>&gt; &gt; by<BR>&gt; &gt; Including:<BR>&gt; &gt;<BR>&gt; &gt; METADATA<BR>&gt; &gt; ‘wms_srs’ “EPSG: 32119 EPSG: 4326”<BR>&gt; &gt; END<BR>&gt; &gt; within the WEB section of my map file and adding OpenLayers.WMS within my<BR>&gt; &gt; OpenLayers file.<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; However I now get the following error message within the openlayers map<BR>&gt; &gt; window “msWMSLoadGetMapParams(): WMS Server Error”<BR>&gt; &gt;<BR>&gt; &gt; I also added ‘projection: "epsg: 32119 epsg:4326” into my openlayers file<BR>&gt; &gt; which hasn’t made any difference<BR>&gt; &gt;<BR>&gt; &gt; Does anyone have any idea where I am going wrong? Any help greatly<BR>&gt; &gt; appreciated. My map and openlayers files are below.<BR>&gt; &gt;<BR>&gt; &gt; Cheers<BR>&gt; &gt;<BR>&gt; &gt; p.s. I ahve installed ms4w on windows which i tihnk supports WMS<BR>&gt; &gt;<BR>&gt; &gt; MAP<BR>&gt; &gt;<BR>&gt; &gt; NAME UK1<BR>&gt; &gt; SIZE 1600 1200<BR>&gt; &gt; IMAGECOLOR 153 204 255<BR>&gt; &gt; IMAGETYPE JPEG<BR>&gt; &gt; SHAPEPATH "http://localhost/openlayers/data/"<BR>&gt; &gt; EXTENT -888385.321101 -31000.000000 1548385.321101 1271000.000000<BR>&gt; &gt; UNITS METERS<BR>&gt; &gt;<BR>&gt; &gt; WEB<BR>&gt; &gt; TEMPLATE "http://localhost/openlayers/examples/test.html"<BR>&gt; &gt; LOG "\ms4w\tmp\ms_tmp\log.txt"<BR>&gt; &gt; IMAGEPATH "\ms4w\tmp\ms_tmp\"<BR>&gt; &gt; IMAGEURL "/ms_tmp/"<BR>&gt; &gt; METADATA<BR>&gt; &gt; 'wms_srs' "epsg: 32119 epsg: 4326"<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt;<BR>&gt; &gt; LAYER<BR>&gt; &gt;<BR>&gt; &gt; NAME "UK"<BR>&gt; &gt; STATUS DEFAULT<BR>&gt; &gt; TYPE raster<BR>&gt; &gt; TILEINDEX "map"<BR>&gt; &gt; TILEITEM "Location"<BR>&gt; &gt; CLASS<BR>&gt; &gt; STYLE<BR>&gt; &gt; COLOR 0 0 0<BR>&gt; &gt; END<BR>&gt; &gt; LABEL<BR>&gt; &gt; COLOR 0 0 0<BR>&gt; &gt; SIZE SMALL<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt;<BR>&gt; &gt; END<BR>&gt; &gt; END<BR>&gt; &gt;<BR>&gt; &gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<BR>&gt; &gt; &lt;head&gt;NARIMS MAPPING TEST<BR>&gt; &gt; &lt;style type="text/css"&gt;<BR>&gt; &gt; #map {<BR>&gt; &gt; width: 95%;<BR>&gt; &gt; height: 95%;<BR>&gt; &gt; border: 10px 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 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.OverviewMap());<BR>&gt; &gt; map.addControl(new OpenLayers.Control.MousePosition());<BR>&gt; &gt; layer = new OpenLayers.Layer.WMS ( "OpenLayers WMS",<BR>&gt; &gt; "http://127.0.0.1/cgi-bin/mapserv.exe?", { layers: 'basic', map:<BR>&gt; &gt; '/ms4w/apps/openlayers-2.5/data/uk1.map', projection: "epsg “32119<BR>&gt; &gt; epsg:4326" },<BR>&gt; &gt; { 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;<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; Share your photos with Windows Live Photos – Free.<BR>&gt; &gt; http://clk.atdmt.com/UKM/go/134665338/direct/01/_______________________________________________<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>&gt; &gt;<BR>&gt; <BR>&gt; <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>