<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>I've been reading about OpenLayers on James Fee's blog and I'm really interested in working with it. I'm a long time ArcIMS developer so the concepts here are close to what I'm used to using (well I'm not used to using JavaScript which is my problem).<BR> <BR>I've got a mapfile up and running.<BR> <BR>MAP<BR> NAME Installation<BR> SIZE 800 500<BR> IMAGECOLOR 240 240 240<BR> EXTENT 582919.88200 4182989.235900 610195.822000 4207241.321900<BR> UNITS METERS<BR> PROJECTION<BR> "init=EPSG:32616"<BR> END<BR> WEB<BR> IMAGEPATH "/ms4w/tmp/ms_tmp/"<BR> IMAGEURL "/ms_tmp/"<BR> METADATA<BR> <FONT face="">WMS_TITLE</FONT> "WMS Test"<BR> <FONT face=""><FONT face="">WMS_ABSTRACT</FONT></FONT> "My attempt at actually moving from ArcIMS to WMS"<BR> <FONT face=""><FONT face="">WMS_ACCESSCONSTRAINTS</FONT></FONT> "none"<BR> <BR> <FONT face="">WMS_ONLINERESOURCE</FONT> "<A href="http://localhost:8080/test/test.html">http://localhost:8080/test/test.html</A>"<BR> WMS_SRS "EPSG:32616"<BR> END<BR> END<BR> <BR> LAYER<BR> NAME "Installation"<BR> TYPE POLYGON<BR> STATUS DEFAULT<BR> DATA "Installation_Area.shp"<BR> <BR> CLASS<BR> NAME 'Installation'<BR> OUTLINECOLOR 60 60 60<BR> COLOR 255 255 0<BR> SYMBOL 0<BR> END<BR> END <BR>END<BR> <BR>Which returns a simple map when I test it: <A title=http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map&mode=map href="http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map&mode=map" target=_blank><U><FONT color=#810081>http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map&mode=map</FONT></U></A><BR> <BR>Now, I've decided to try OpenLayers and this is my code which I borrowed from one of the examples:<BR> <BR><html xmlns="<A href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"><BR> <head><BR> <style type="text/css"><BR> #map {<BR> width: 800px;<BR> height: 475px;<BR> border: 1px solid black;<BR> }<BR> </style><BR> <script src="OpenLayers.js"></script><BR> <script type="text/javascript"><BR> function init(){<BR> map = new OpenLayers.Map( 'map' );<BR> layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", <BR> "<A href="http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map">http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map</A>", {layers: 'Installation'} );<BR> map.addLayer(layer);<BR> }<BR> </script><BR> </head><BR> <body onload="init()"><BR> <div id="map"></div><BR> </body><BR></html><BR> <BR>When I run it, I get a tiles which say:<BR> <BR>msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be valid for all requested layers.<BR> <BR>Now I looked at the doc and it seems like you can set the projection which I tried, but it still returned the same error. I'm sure I'm close, but I'm just a little out of my league right now with openlayers.<BR> <BR>Any help would be greatly appreciated.<BR> <BR>David.<BR> <BR><BR> <BR><br /><hr />Peek-a-boo FREE Tricks & Treats for You! <a href='http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us' target='_new'>Get 'em!</a></body>
</html>