WMS server - legend graphic/symbology
Kevin Grootendorst
kgrootendorst at BAIRD.COM
Fri Jun 24 08:00:23 PDT 2005
Bart,
Thanks for your suggestion.
I added NAME " " to the CLASS object and everything works as expected.
Do you know why ALL the wms layers would be turned 'on' while viewing in
ArcMap? I assumed that only the layers with STATUS ON would be visible
initially.
The log that ArcMap sends is as follows:
"GET /cgi-bin/mapserv.exe?map=/web/maplab-
2.2/Pelee/Pelee.map&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:26917&BBOX=298978.
084774465,4606186.14109543,512740.303618177,4785860.76331283&WIDTH=972&HEIGH
T=817&LAYERS=Municipalities_coarse,Cities&STYLES=&EXCEPTIONS=application/vnd
.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE HTTP/1.1"
200 53798
The 'cities' layer is set to Status OFF, but still draws when the service
is first added to ArcMap.
Kevin
On Fri, 24 Jun 2005 16:48:29 +0200, Bart van den Eijnden <BEN at SYNCERA-
ITSOLUTIONS.NL> wrote:
>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