<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Display Map from MapServer with OpenLayers</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hello List,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I've Setup a mapserver with an example Map.</FONT>

<BR><FONT SIZE=2 FACE="Arial">I can successfully open the link from the MapServer in uDig on my notebook, without any other information than the link:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Link Format: </FONT><A HREF="http://domain/cgi-bin/mapserv?map=/path/to/project.map&amp;request=getcapabilities&amp;service=WMS&amp;version=1.0.0"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://domain/cgi-bin/mapserv?map=/path/to/project.map&amp;request=getcapabilities&amp;service=WMS&amp;version=1.0.0</FONT></U></A>

<BR><FONT SIZE=2 FACE="Arial">(I changed the domain and the path, the parameters stay the same).</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">But I always fail trying to display the map inside OpenLayers.</FONT>

<BR><FONT SIZE=2 FACE="Arial">I tried to use </FONT><A HREF="http://openlayers.org/dev/examples/wms.html"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://openlayers.org/dev/examples/wms.html</FONT></U></A><FONT SIZE=2 FACE="Arial"> and changed it slightly:</FONT>
</P>

<P><B><FONT SIZE=2 FACE="Arial">map = new OpenLayers.Map( 'map' );</FONT></B>

<BR><B><FONT SIZE=2 FACE="Arial">layer = new OpenLayers.Layer.WMS( &quot;OpenLayers WMS&quot;, &quot;</FONT></B><A HREF="http://domain/cgi-bin/mapserv?map=/path/to/project.map&amp;request=getcapabilities&amp;service=WMS&amp;version=1.0.0"><B><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://domain/cgi-bin/mapserv?map=/path/to/project.map&amp;request=getcapabilities&amp;service=WMS&amp;version=1.0.0</FONT></U></B></A><B><FONT SIZE=2 FACE="Arial">&quot;, {layers: 'basic'} );</FONT></B></P>

<P><B><FONT SIZE=2 FACE="Arial">map.addLayer(layer);</FONT></B>
</P>

<P><FONT SIZE=2 FACE="Arial">But it does only display pink squares instead of images.</FONT>

<BR><FONT SIZE=2 FACE="Arial">As said, the MapServer works fine when opening with uDig&#8230;</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks a lot for your assistance!</FONT>

<BR><FONT SIZE=2 FACE="Arial">Sincerely yours,</FONT>

<BR><FONT SIZE=2 FACE="Arial">Lucas P.</FONT>
</P>

</BODY>
</HTML>