I want to customize the legend box elements .Please check the screenshot


(I want to remove the highlighted information... it's the map service name and symbol in ArcMap)

How its possible? Is there any way or are there any parameters in the legend constructor??

I tried to modify following code but it was not successful...

Code: dojo.connect(map,'onLayersAddResult',function(results){ var layerInfo = dojo.map(results, function(layer,index){ return {***layer: abc,title: 'new legend'***}; }); if(layerInfo.length > 0){ var legendDijit = new esri.dijit.Legend({ map:map, layerInfos:layerInfo },"legendDiv"); legendDijit.startup(); } });

  • Software Details: ArcGIS Server 10.1 & ArcGIS Java script API 3.1 – Sunil Oct 23 '12 at 9:40

try the following:

go to the table of contents and open the properties of the layer. it looks like you are doing categories for symbols, so uncheck "all other value" on the symbology tab.

now open the legend properties. uncheck "show" for the legend. next, find the style button for the legend and change it to something that is more to your liking.

this should get it down to the required items,


| improve this answer | |
  • Hello gm70560, Thanks for your reply with example link. I will try it and let you know.. thanks once again : ) – Sunil Oct 24 '12 at 4:46
  • Hi gm70560, I did changes in ArcMap & its works successfully : ) – Sunil Oct 25 '12 at 5:23

Some good references can be found HERE

essentially, you are going to have to modify your CSS.

| improve this answer | |
  • Hi Craig, Thanks for your reply..I will check out and let you know.. Thank you : ) – Sunil Oct 24 '12 at 4:47
  • Hi Craig, Its works successfully : ) – Sunil Oct 25 '12 at 5:22

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.