[mapserver-users] OpenLayers and MapServer Itasca Demo

Jason Allen jason at ingagi.com
Sat Feb 23 13:13:21 PST 2008


I just started working with MapServer yesterday and it rocks!

I've been learning my around with the MapServer 5.x Demo App (Itasca) and
while it works fine using HTML templates, I can't get it to play nicely with
OpenLayers.  OpenLayers simply returns blank map tiles.

The itasca.map file is stock except that I uncommented the projection info:
PROJECTION
"init=epsg:26915"
END

My OpenLayers setup is very simple as well:

 function init(){
            map = new OpenLayers.Map( 'map' );
            layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
               "http://dev.312pulse.com/cgi-bin/mapserv?map=itasca.map",
{layers: 'drgs,lakespy2'},
                    {gutter: 15});
            map.addLayer(layer);
            map.zoomToMaxExtent();
            map.addControl( new OpenLayers.Control.LayerSwitcher() );
        }


Does anyone have any idea why OpenLayers isn't displaying any data, or how
to troubleshoot this issue?  MapServer logging isn't the most verbose, and I
haven't been able to track down any other clues.

My OpenLayers test page (doesn't work):
http://dev.312pulse.com/map.html

Workshop demo (works):
http://dev.312pulse.com/workshop/

Thanks,

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080223/b5bbee4b/attachment.htm>


More information about the MapServer-users mailing list