Hello,
First thing that I see is the missing END keywords for each LAYER blocks. Personnaly, since I used MapServer in WMS mode, I also add WMS_NAME directive into the METADATA block. Hope this will help. Dominique Langlois Ressources naturelles Canada Natural Resources Canada Centre d'information topographique Centre for Topographic Information Équipe Services Web Web Services Team Sherbrooke (Québec) J1J 2E8 Sherbrooke, Quebec J1J 2E8 Courriel: langl...@rncan.gc.ca <mailto:langl...@rncan.gc.ca> E-Mail: langl...@nrcan.gc.ca <mailto:langl...@nrcan.gc.ca> ________________________________ From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Strunck, Alexander Sent: 5 août 2010 08:51 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Layerswitcher all Layers in one Mapfile Hello i am just testing a layerswitcher. First i programmed it so that every layer is in a separate mapfile. everything works fine. now i want to try to put all layers in one mapfile. but now if i want to turn a layer on, i get the message msWMSLoadGetMapParams():WMS server error. Invalid layer(s) given in the LAYERS parameter. the html file looks like this var bicc_wms = new OpenLayers.Layer.WMS( "baselayer", "****/cgi-bin/mapserv", { map: '/var/www/map_data/umn/allinone.map', layers: 'baselayer', format: 'image/png', transparent: 'false' }, {isBaseLayer: true, visibility: false} ); layer_test1 = new OpenLayers.Layer.WMS( "milex", "****/cgi-bin/mapserv", { map: '/var/www/map_data/umn/allinone.map', layers: "milex", transparent: "true", format: "image/png" }, {isBaseLayer: false, visibility: false} ); the part of the mapfile looks like this LAYER NAME 'baselayer' GROUP 'baselayer' TYPE Polygon INCLUDE 'postgis.config' DATA 'the_geom from (SELECT c.gid, c.the_geom AS the_geom FROM basemap AS c ) as foo using unique gid using SRID=4326' STATUS on METADATA WMS_TITLE 'Grenzen aller Länder' WMS_FEATURE_INFO_MIME_TYPE 'text/html' END #METADATA CLASS NAME 'Grenzen aller Länder' STYLE COLOR 211 211 211 OUTLINECOLOR 1 1 1 END #STYLE END # CLASS #------------------------------------------------------------------------------- # LayerGroup Klassen Militärausgaben # #------------------------------------------------------------------------------- LAYER NAME 'milex' TYPE Polygon INCLUDE 'postgis.config' DATA 'the_geom from (SELECT c.gid, gmi.c_milex AS rank, c.the_geom AS the_geom FROM basemap AS c LEFT JOIN m3_thema1_2008_2 AS gmi ON c.iso3_code = gmi.iso3_code) as foo using unique gid using SRID=4326' STATUS off METADATA WMS_TITLE 'Country Boundaries' WMS_FEATURE_INFO_MIME_TYPE 'text/html' END #METADATA CLASS NAME 'no data available' EXPRESSION ([rank] eq 999) STYLE COLOR 211 211 211 OUTLINECOLOR 1 1 1 END #STYLE END # CLASS has someone an idea?? thx alex ________________________________ -- Internationales Konversionszentrum Bonn Bonn International Center for Conversion (BICC) GmbH Pfarrer- Byns-Straße 1, 53121 Bonn, GERMANY Tel. / Phone: +49-228-911 96 0, Fax: +49-228-911 96 - 22 Internet: www.bicc.de, E-mail: b...@bicc.de Firmensitz/ Office: Bonn Registergericht/ Registered at: Amtsgericht Bonn, HRB 6717 Geschäftsführer/ Director: Peter Johannes Croll Prokurist/ Authorized Signatory: Michael Dedek
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users