[ms4w-users] Help with OpenLayers

Chip Taylor work at xwb.com
Mon Jun 11 17:21:11 EDT 2007

Looking for some help with OpenLayers and MapServer WMS.  I am trying to
implement a test of OpenLayers using MapServer as a WMS layer.

My Mapserver WMS, when accessed outside of OpsnLayers returns a map just
fine.  But within OpenLayers I receive an error of "Invalid SRS given: RST
must be valid

My Mapserver map file (named wmstest.map) has a Metadata as follows:

      "wms_title"           "WMS Test Server"
      "wms_srs"             "epsg:4269"

There is one layer with a name of "states" with metadata as follows:

	"wms_title"    "states"   ##required

My OpenLayers HTML looks like this:

function init(){
            map = new OpenLayers.Map( $('map') );
            layer = new OpenLayers.Layer.WMS( "Test WMS",
&", {layers: 'states'} );

            map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
            map.addControl( new OpenLayers.Control.LayerSwitcher() );

What am I doing wrong?  Any help appreciated!

Chip Taylor
Prepared Response, Inc

More information about the ms4w-users mailing list