Use: layer = new OpenLayers.Layer.WMS( "Streets", "http://10.0.0.162/cgi-bin/mapserv.exe", {map: 'C:/MyMaps/Malta/malta.map', layers: 'malta_highway'}, {'isBaseLayer':false} );
Bart > > Hi, > > I hope someone can help me on this as I cannot figure out whats wrong. > > I changed the call in openlayers to my mapserver from: > > layer = new OpenLayers.Layer.MapServer( "Streets", > "http://10.0.0.162/cgi-bin/mapserv.exe", > {map: 'C:/MyMaps/Malta/malta.map'}, > {'isBaseLayer':false}, > {gutter: 15} > ); > > to > > layer = new OpenLayers.Layer.WMS( "Streets", > "http://10.0.0.162/cgi-bin/mapserv.exe", > {map: 'C:/MyMaps/Malta/malta.map'}, > {'isBaseLayer':false}, > {layers: 'malta_highway'} > ); > > But for some particular reason I am getting an error. It says: > > msWMSLoadGetMapsParams(): WMS Server Error > > Invalid Layer(s) given in the LAYERS parameter. > > In the mapfile I have the following layer: > > LAYER > NAME 'malta_highway' > TYPE LINE > DATA 'C:/MyMaps/Malta/malta_highway.shp' > METADATA > 'wms_title' 'malta_highway' > 'wms_name' 'malta_highway' > 'wms_format' 'image/png' > 'wms_srs' 'EPSG:4326' > 'wms_onlineresource' > 'http://10.0.0.162/cgi-bin/mapserv.exe?map=C:/MyMaps/Malta/malta.map?' > END > STATUS DEFAULT > TRANSPARENCY 100 > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > CLASS > NAME 'malta_highway' > STYLE > SYMBOL 0 > SIZE 2 > OUTLINECOLOR 101 101 101 > COLOR 0 0 0 > END > END > END > > Anyone knows why this is hapening? > -- > View this message in context: > http://n2.nabble.com/ERROR-Invalid-Layer-s-given-in-the-LAYERS-parameter-Anyone-knows-why-tp4736286p4736286.html > Sent from the OpenLayers Dev mailing list archive at Nabble.com. > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev