Actually that is not a very good idea and bad coding practice.
Your problem was including {layers:'basic'} the word basic is not some variable 
relating to type or styule of layers it is an actual layer name in the example 
WMS. Instead of "basic" you should have your layer names listed there. So your 
code should be:
var loadedMap = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
"http://localhost:8085/cgi-bin/mapserv.exe?";,
{map: '/ms4w/apps/app/test.map', mode:'map', format: 'png',
transparent:'false', layers: 'states_poly','states_line'},
{gutter: 15});

 hope that helps
Matt Priour

A variation on your theme worked. I put the multiple layers in the URL

this 
http://localhost:8085/cgi-bin/mapserv.exe?map=/ms4w/apps/app/test.map&layer=states_poly&layer=states_line&mode=map

seems to equal this

var loadedMap = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
"http://localhost:8085/cgi-bin/mapserv.exe?layer=states_poly&layer=states_line";,
{map: '/ms4w/apps/app/test.map', mode:'map', format: 'png',
transparent:'false'},
 {layers: 'basic'},
{gutter: 15});

Thanks!
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to