I have a ArcGISDynamicMapServiceLayer layer that has a layer within it I am applying a createClassedColorRenderer to which is working great. I want to change the name/title that appears in the legend after I apply the renderer. So by default it appears as "State" as is defined in the MDX. I want to change it to something like "State by Market Share" after I apply the renderer. I can find examples of doing this to a feature layer, but not a layer within a ArcGISDynamicMapServiceLayer. Any hints would be appreciated.
Solved! Go to Solution.
Okay figured this out
layer.layerInfos[0].name="New Legend Label";
will change inner layer 0's legend label to "New Legend Label".
Okay figured this out
layer.layerInfos[0].name="New Legend Label";
will change inner layer 0's legend label to "New Legend Label".