[OpenLayers-Users] Getting up and running with OpenLayers

drk mattr drkmattr at hotmail.com
Fri Nov 9 11:42:25 EST 2007


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). I've got a mapfile up and running. MAP    NAME Installation    SIZE 800 500    IMAGECOLOR 240 240 240    EXTENT 582919.88200 4182989.235900 610195.822000 4207241.321900    UNITS METERS    PROJECTION      "init=EPSG:32616"    END    WEB        IMAGEPATH "/ms4w/tmp/ms_tmp/"        IMAGEURL "/ms_tmp/"        METADATA          WMS_TITLE "WMS Test"          WMS_ABSTRACT "My attempt at actually moving from ArcIMS to WMS"          WMS_ACCESSCONSTRAINTS "none"          WMS_ONLINERESOURCE "http://localhost:8080/test/test.html"         WMS_SRS "EPSG:32616"       END    END  LAYER  NAME "Installation"  TYPE POLYGON  STATUS DEFAULT  DATA "Installation_Area.shp"    CLASS   NAME 'Installation'   OUTLINECOLOR 60 60 60   COLOR 255 255 0   SYMBOL 0  END END END Which returns a simple map when I test it:  http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map&mode=map Now, I've decided to try OpenLayers and this is my code which I borrowed from one of the examples: <html xmlns="http://www.w3.org/1999/xhtml">  <head>    <style type="text/css">        #map {            width: 800px;            height: 475px;            border: 1px solid black;        }    </style>    <script src="OpenLayers.js"></script>    <script type="text/javascript">        function init(){            map = new OpenLayers.Map( 'map' );            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",                     "http://localhost:8080/cgi-bin/mapserv.exe?MAP=/ms4w/apache/htdocs/test/test.map", {layers: 'Installation'} );            map.addLayer(layer);        }    </script>  </head>  <body onload="init()">    <div id="map"></div>  </body></html> When I run it, I get a tiles which say: msWMSLoadGetMapParams():  WMS server error. Invalid SRS given : SRS must be valid for all requested layers. 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. Any help would be greatly appreciated. David.  
_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071109/1a39f06c/attachment.html


More information about the Users mailing list