Thanks for the help with this. It appears that the problem I was having was due to the lack of having a declared projection in my OpenLayers.Map. The following, along with a declared projection in the MAP portion of my mapfile, and a "wms_srs" parameter set in the WEB section of the mapfile seems to work well.<br>
<br>var map = new OpenLayers.Map('map', <br><br> { maxExtent: new OpenLayers.Bounds(716805.363551,570361.299368,832620.878780,660361.288174), <br> units: 'feet', <br>
projection: "epsg:2286", <br> maxResolution: 'auto', <br> numZoomLevels: 16, <br> controls: []<br> });<br>var wetlands = new OpenLayers.Layer.MapServer('wetland_test', '<a href="http://localhost/cgi-bin/mapserv?">http://localhost/cgi-bin/mapserv?</a>',<br>
{ map: '/var/www/520_webmap/mapfiles/520_ECP.map',<br> layers: 'Wetlands',<br> format: 'image/png',<br> }, <br> {buffer: 0, gutter: 15})<br>
-------------------<br><br><div class="gmail_quote">On Wed, Apr 30, 2008 at 10:33 AM, Arnd Wippermann <<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi Roger,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">you must declare the right projection for your map. Without
any option the projection OpenLayers will use is EPSG:4326 with -180,-90,180,90
as extent. So the response of the WMS request is all right, if you
get blank tiles. </font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Try something like this:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> var options =
{<br> projection:
"EPSG:2286",<br> //perhaps also
</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> //maxResolution:
....</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> units:
"m",<br> maxZoomLevel :
16,<br> //if set you must add your
controls manuel after the map declaration</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">
//controls :
[],<br> numZoomLevels :
16,<br> //this is a
guess</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> maxExtent: new
OpenLayers.Bounds(500000, 500000, 1000000, 1000000)<br>
};<br> map = new OpenLayers.Map('map',
options);<br></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">With maxResolution I am not all clear. I always set it. For
Google it is 156543.0339.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">
<p><font size="2">Mit freundlichen Grüssen<br><br>Arnd Wippermann<br><a href="http://gis.ibbeck.de/ginfo/" target="_blank">http://gis.ibbeck.de/ginfo/</a><br><br></font></p></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span><span><font color="#0000ff" face="Arial" size="2"></font></span> </div><br>
<div dir="ltr" align="left" lang="de">
<hr>
<font face="Tahoma" size="2"><b>Von:</b> <a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>
[mailto:<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>] <b>Im Auftrag von </b>Roger
André<br><b>Gesendet:</b> Mittwoch, 30. April 2008 03:49<br><b>An:</b>
<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Betreff:</b> [OpenLayers-Users] Trouble getting
mapserver WMS layer to load in OL<br></font><br></div><div><div></div><div class="Wj3C7c">
<div></div>Hi,<br><br>I'm a new user of Mapserver and am having a hard time with
getting layers from a new mapfile to load in OpenLayers. I've tested that
my local mapserver install is responding correctly to WMS requests, and it seems
to work correctly. Here is the request, with some linebreaks for
clarity;<br><br><a href="http://localhost/cgi-bin/mapserv?map=/var/www/520_webmap/mapfiles/520_ECP.map" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/520_webmap/mapfiles/520_ECP.map</a><br>&SERVICE=WMS<br>
&version=%221.1.122<br>&REQUEST=GetMap<br>&LAYERS=Wetlands<br>&STYLES=<br>&BBOX=775843.302946,602429.871045,848438.746010,635418.446144<br>&WIDTH=600<br>&HEIGHT=400<br>&FORMAT=png<br>&SRS=epsg:2286<br>
<br>This
returns an image that contains all of the layers which are active at the scale
of the BBOX area. However, I cannot seem to find the right syntax to get
the layer to load into OpenLayers. I have taken one of the test.html
files, the one for a single wms, and have tested that it works with my
openlayers.js install. This is that
file:<br>-----------------------<br><html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"><br>
<head><br> <title>OpenLayers Basic Single WMS
Example</title><br> <link rel="stylesheet"
href="../theme/default/style.css" type="text/css" /><br>
<style type="text/css"><br> #map
{<br> width:
512px;<br>
height:
512px;<br>
border: 1px solid black;<br>
}<br> </style><br> <script src="<a href="http://localhost:8080/geoserver/www/openlayers/OpenLayers.js" target="_blank">http://localhost:8080/geoserver/www/openlayers/OpenLayers.js</a>"></script><br>
<script
type="text/javascript"><br> var
map, layer;<br> function
init(){<br>
map = new OpenLayers.Map( 'map'
);<br> layer =
new OpenLayers.Layer.WMS( "OpenLayers
WMS",<br>
"<a href="http://labs.metacarta.com/wms/vmap0" target="_blank">http://labs.metacarta.com/wms/vmap0</a>",<br>
{layers: 'basic'}
);<br>
map.addLayer(layer);<br>
map.zoomToMaxExtent();<br>
}<br> </script><br> </head><br>
<body onload="init()"><br> <h1 id="title">Basic
Single WMS Example</h1><br><br> <div
id="tags"></div><br><br> <div
id="shortdesc">Show a Simple Map</div><br><br>
<div id="map"></div><br><br> <div
id="docs"><br> This example shows a
very simple layout with minimal controls. This example uses a single WMS
base layer.<br> </div><br>
</body><br></html><br>------------------------------<br><br>No
matter how I edit the file though, when I point to my localhost mapserver
instance, I just get an empty map frame, with no map controls, or anything
inside of it. Right now the layer portion looks like
this:<br><br> <script
type="text/javascript"><br> var
map, layer;<br> function
init(){<br>
map = new OpenLayers.Map('map', <br>
{ maxExtent: new
OpenLayers.Bounds(775843.302946,602429.871045,848438.746010,635418.446144),
<br>
maxResolution:
"auto",<br>
projection:"SRS_not_defined" <br>
}
);<br>
layer = new
OpenLayers.Layer.WMS( '520_WebMap', <br>
"<a href="http://localhost/cgi-bin/mapserv" target="_blank">http://localhost/cgi-bin/mapserv</a>?",<br>
{ layers: 'Wetlands',
<br>
map:
'map=/var/www/520_webmap/mapfiles/520_ECP.map',<br>
format: 'image/png',<br>
request: 'getmap',<br>
transparent: "false"<br>
});<br>
map.addLayer(layer);<br>
map.zoomToMaxExtent();<br> </script><br><br>I'm hoping
one of you has encountered a similar problem and can give me some advice for how
to resolve it.<br><br>Thanks,<br><br>Roger<br></div></div></div>
</blockquote></div><br>