Select to view content in your preferred language

Bug in LegendSkin.mxml

475
0
04-16-2013 05:08 AM
TomSchuller
Frequent Contributor
Hy,
we had problems with the legend.
We are using the ArcGIS for Flex v3.2 (build date 2013-03-19)

After some code inspections,
we identified the problem in this part of the code (LegendSkin.mxml lines 631..637):
if (layerInfos.parentLayerId != -1){
    // find the parent and check its default visibility
    var parentLayerInfo:LayerInfo = findLayerById(layerInfos[0].parentLayerId, layerInfos);
    layerInfos.defaultVisibility = parentLayerInfo.defaultVisibility;
}
leafLayerLegendInfo.visible = layerInfos.defaultVisibility;



We got it working after replacing the code in the line 634 :
findLayerById(layerInfos[0].parentLayerId, layerInfos);

with
findLayerById(layerInfos.parentLayerId, layerInfos);



Is this a bug in the current 'LegendSkin.mxml' code provided with the API?


Thanks,
Tom
Tags (2)
0 Kudos
0 Replies