1

I have a Mapping and WMS Service that I have published via ArcServer 10.3.1.

When communicating with the WMS service via a web browser, using a GetLegendGraphic Request. I am returned a graphic of my legend, such as:

enter image description here

In addition to this, I need the layer name at the top of the legend. Similar to what I see in my MXD:

enter image description here

Is there any way to get the layer name displayed when I use the GetLegendGraphic request?

1

One way of doing this is to create your own legend graphic image using software of your choice and saving this to your web server. Then you need to create a custom (external) GetCapabilities response for your WMS service and substitute the default attributes of the Style section for your Cumulative Water (bbls) layer like below:

<Style>
     <Name>default</Name>
     <Title>1</Title>
     <LegendURL 
        width="[your image width]" 
        height="[your image height]">
     <Format>[your image format one of image/png, image/jpeg, image/gif]</Format>
     <OnlineResource 
        xlink:href="[URL of your image"] 
        xlink:type="simple"/>
     </LegendURL>
</Style>

For details on creating a custom GetCapabilities response see:

ArcGIS Help 10.1 ~ Using external capabilities files with WMS services

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.