Hi, In the "WMS world" you get a legend by requesting it with a GetLegendGraphic request, something like:
http://geoserver.itc.nl/cgi-bin/mapserv.exe?map=D:/Inetpub/mapserver/config OL.map&SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.1.1&FORMAT=image/png& LAYER=forest And you can do this for any of let LAYERs you have in you MAP file... Barend -- Barend Köbben Senior Lecturer, ITC - University of Twente, Faculty of Geo-Information Science and Earth Observation PO Box 217, 7500AE Enschede (The Netherlands) +31-(0)53 4874 253 On 12-06-12 17:12, "Basques, Bob (CI-StPaul)" <bob.basq...@ci.stpaul.mn.us> wrote: >All, > >I have this MAPFILE which works fine for a Map image, but how do I get a >WMS legend from the upstream WMS service? Do I need to set up a LAYER >(like) definition inside of a LEGEND block for a mode=legend to work >downstream. Right now I get a blank image. > >I don't see any information on the topic in this page: > >http://mapserver.org/ogc/wms_client.html#mapfile-configuration > >About WMS Legend pass-through . . . > >Thanks > >bobb > > >------------ > >MAP > NAME 'WS_Distribution_Mains' > SIZE 800 650 > EXTENT 593133.398829 170094.734526 593893.148973 170712.010326 > > STATUS ON > UNITS FEET > IMAGETYPE PNG24 > > PROJECTION > "init=epsg:200068" > END > > LAYER > NAME "WS distribution Mains" > TYPE RASTER > STATUS DEFAULT > CONNECTION >"http://XXX.stpaul.city/ArcGIS/services/AUTOCAD/MapServer/WMSServer?" > CONNECTIONTYPE WMS > > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "2" > "wms_server_version" "1.1.1" > "wms_format" "image/png24" > > "ows_title" "0" > "gml_include_items" "all" > END > > PROJECTION > "init=epsg:4326" > END > END #layer > > ##CONFIG "MS_ERRORFILE" "/tmp/trying2.txt" > ##DEBUG 5 > >END > Faculty of Geo-Information Science and Earth Observation (ITC) University of Twente Chamber of Commerce: 501305360000 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users