[OpenLayers-Users] Display Map from MapServer with OpenLayers

Barend Köbben kobben at itc.nl
Wed May 9 10:56:53 EDT 2007


>Try this instead:
>
>layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
>"http://domain/cgi-bin/mapserv?map=/path/to/project.map <http://domain/cgi-bin/mapserv?map=/path/to/project.map> ", {layers: 'basic'} );

...or, if you need SLD based stylings (as I did): 
 
"http://domain/cgi-bin/mapserv?map=/path/to/project.map <http://domain/cgi-bin/mapserv?map=/path/to/project.map> ", 
{layers: "landcover", 
     SLD: "url-to-your-SLD <http://geoserver.itc.nl/mapserver/sld/galicia.xml> "}
     );
 
...and if you want the layer to be an overlay iso. a base layer:
 
"http://domain/cgi-bin/mapserv?map=/path/to/project.map <http://domain/cgi-bin/mapserv?map=/path/to/project.map> ", 
{layers: "landcover", 
     SLD: "url-to-your-SLD <http://geoserver.itc.nl/mapserver/sld/galicia.xml> ",
     format: "image/png",
     transparent: "true"}
     );
-- 
Barend Köbben 
International Institute for Geo-information Sciences and  Earth Observation (ITC) 
PO Box 6, 7500AA Enschede (The Netherlands) 
ph: +31-(0)534874253; mobile: +31-(0)622344955

 



More information about the Users mailing list