WMS server - legend graphic/symbology

Bart van den Eijnden BEN at SYNCERA-ITSOLUTIONS.NL
Fri Jun 24 07:48:29 PDT 2005


You always need to add a NAME to the CLASS which you want Mapserver to show in the legend.

Not sure if this will get you through showing the legend in ArcMap though. Try and log the request that ArcMap is sending.

Does Mapserver put a LegendURL in your WMS capabilities and does it work? I am assuming ArcMap will use that for input.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> Kevin Grootendorst <kgrootendorst at BAIRD.COM> 06/24/05 04:44pm >>>
Hi,
I have a map file which I'm setting up as a WMS server, so that I can view
my data in ArcMap 9.
I'm successful in viewing the WMS in ArcMap, however it does not contain a
graphic in the legend.  In other words, the layers draw correctly (with
same colors as in the map file), but the legend does not indicate any
symbology.

Any ideas how I can get the legend symbology to show?
Using MS 4.4 on win2000.

Below is a snippet from my .map file:
(web definition:)
WEB
    IMAGEPATH "C:/web/ms_tmp/"
    IMAGEURL "/ms_tmp/"
  METADATA
     "wms_title" "Pelee WMS"
     "wms_onlineresource" "http://maps.baird.com/cgi-bin/mapserv.exe? 
map=/web/maplab-2.2/Pelee/Pelee.map&"
     "wms_srs" "EPSG:26917"
     "wms_abstract" "Pelee WMS server"
            "wms_style" ""
   END
  END # END OF WEB SECTION

(layer definition):
LAYER
    #NAME "Municipalities (coarse)"
    NAME "Municipalities_coarse"
    GROUP "BASE"
    METADATA
 "wms_title" "Municipalities"
        "wms_srs" "EPSG:26917"
 "wms_style" ""
        "wms_group_title"  "base"
    END
    STATUS on
    DATA "./Municipalities"
    TYPE POLYGON
    UNITS METERS
    TEMPLATE "ttt"
    SIZEUNITS PIXELS
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    LABELITEM "NAME"
    CLASS
    LABEL
        TYPE BITMAP
        SIZE tiny
        POSITION cc
        OFFSET 0 0
        COLOR 100 100 100
        #SHADOWSIZE 1 1
 OUTLINECOLOR 255 255 255
      END
      STYLE
        SYMBOL 8
        OUTLINECOLOR 0 0 0
        BACKGROUNDCOLOR 99 99 99
        SIZE 2
      END
    END
  END



More information about the MapServer-users mailing list