Hi All,I have recently created a web map that uses the legend snippet from the ESRI JavaScript API website.https://developers.arcgis.com/en/javascript/jssamples/widget_legend.htmlIt works great for the most part, but has one issue, there are duplicate entries in the legend. (Refer to this image: [ATTACH=CONFIG]25925[/ATTACH])The rest services that I am using are all symbolized properly without duplicates. The method I'm using to add the services to the map is through a feature layer.This is the exact code in my .js file. dojo.connect(myMap, 'onLayersAddResult', function (results) {
var layerInfo = dojo.map(results, function (layer, index) {
return { layer: layer.layer, title: layer.layer.name };
});
if (layerInfo.length > 0) {
var legendDijit = new esri.dijit.Legend({
map: myMap,
layerInfos: layerInfo},
"legendDiv");
legendDijit.startup();
}
});
Any information would help.Thanks