Change Legend Title of Sublayer

3042
1
08-12-2015 03:41 PM
JohnPreston
Occasional Contributor

Hi, I have a map service with multiple sub-layers, which I am adding to a map as Dynamic Map Service Layer. I have added the Legend Widget, which works great, but would like to change the titles of the sub-layers. I am able to change the title of the primary layer but do not see how to change sub-layers. Can I do that?

0 Kudos
1 Reply
ZdeněkJankovský
Esri Contributor

Hi John,

I am sorry I don't know the answer to your question: I can only quess if it is not possible to change it with  ArcGISDynamicMapServiceLayer.layerInfos[0].name (ArcGISDynamicMapServiceLayer | API Reference | ArcGIS API for JavaScript, LayerInfo | API Reference | ArcGIS API for JavaScript​).

But you mentioned that you are able to change the whole name of MapService in TOC. This one is what I need and I can't figured it out. Can you tell me how did you do it?

Thanks in advanced,

Zdenek J.

0 Kudos