Select to view content in your preferred language

Customize the legend  elements

859
2
Jump to solution
10-22-2012 11:49 PM
SunilPalkar
Deactivated User
Hello All,

I want to customize the legend box elements .Please check the screenshot (I want to remove the highlighted information ...its the map service name and symbol in ArcMap)

[ATTACH=CONFIG]18636[/ATTACH]

How its possible? Is there any way or Are there any parameter in the legend constructor ??
I tried to modify following code but it was not successful

 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();           }         });


Any help will be great...

Thanks in advance : )
0 Kudos
1 Solution

Accepted Solutions
CorySilva
Deactivated User
You can use CSS (display:none; visibility:hidden) for the name of the layer.  As for the second two lines I believe you can remove those in the symbology settings in the actual mxd/msd.

View solution in original post

0 Kudos
2 Replies
CorySilva
Deactivated User
You can use CSS (display:none; visibility:hidden) for the name of the layer.  As for the second two lines I believe you can remove those in the symbology settings in the actual mxd/msd.
0 Kudos
SunilPalkar
Deactivated User
Dear Coryasilva,

Thanks for your reply..I tried your method and its resolved : )

You are great !!!

Thanks : )

You can use CSS (display:none; visibility:hidden) for the name of the layer.  As for the second two lines I believe you can remove those in the symbology settings in the actual mxd/msd.
0 Kudos