[OpenLayers-Users] Display Map from MapServer with OpenLayers

Pfirter Lukas lp at rpag.ch
Wed May 9 09:18:20 EDT 2007


Hello List,

I've Setup a mapserver with an example Map.
I can successfully open the link from the MapServer in uDig on my
notebook, without any other information than the link:
Link Format:
http://domain/cgi-bin/mapserv?map=/path/to/project.map&request=getcapabi
lities&service=WMS&version=1.0.0
(I changed the domain and the path, the parameters stay the same).

But I always fail trying to display the map inside OpenLayers.
I tried to use http://openlayers.org/dev/examples/wms.html and changed
it slightly:

map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://domain/cgi-bin/mapserv?map=/path/to/project.map&request=getcapab
ilities&service=WMS&version=1.0.0", {layers: 'basic'} );
map.addLayer(layer);

But it does only display pink squares instead of images.
As said, the MapServer works fine when opening with uDig...

Thanks a lot for your assistance!
Sincerely yours,
Lucas P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070509/6773689f/attachment.html


More information about the Users mailing list