[OpenLayers-Users] Mapserver vs WMS.layer

Eric Lemoine eric.c2c at gmail.com
Sun Dec 30 13:37:27 EST 2007


On Dec 28, 2007 5:47 PM, Maria Panagou <snowdrop at ath.forthnet.gr> wrote:
>
> I've declared a wms layer using the following syntax, which works fine.
>
>   var quakes = new OpenLayers.Layer.WMS( "Earthquakes",
>                         "http://127.0.0.1:80/cgi-bin/mapserv.exe?",
>                         { map: '../htdocs/mpanagou/Quakes original.map',
>                           transparent:'true',
>                           layers: 'Quakes',
>                           'format':'png'},
>                           {'reproject': true});
>
> I want to test this, using Mapserver layer instead so I replace new
> OpenLayers.Layer.WMS with new OpenLayers.Layer.Mapserver, but the map won't
> show at all. Do I need to use different parameters for the mapserver layer?

You can look at this page
<http://mapserver.gis.umn.edu/docs/reference/cgi> to know more about
the params you can pass to mapserv. Note that OpenLayers will already
pass a few required params to mapserv for you (mapext, imgext, ...)
(see <http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer/MapServer.js>).
I've never just this layer type myself so I can't tell you more...

--
Eric



More information about the Users mailing list