一、通过ILayer获取相关图层的图例ILegendClass
ILayer pLayer = null;
IFeatureLayer pFeatureLayer = pLayer as IFeatureLayer;
ILegendInfo pLegendInfo = pFeatureLayer as ILegendInfo;
ILegendClass pLegendClass = null;
ILegendGroup pLegendGroup = null;
for (int i = 0; i < pLegendInfo.LegendGroupCount; i++)
{
pLegendGroup = pLegendInfo.get_LegendGroup(i);
MessageBox.Show(pLegendGroup.Heading);
for (int j = 0; j < pLegendGroup.ClassCount; j++)
{
pLegendClass = pLegendGroup.get_Class(j);
MessageBox.Show(pLegendClass.Label);
}
}
下面是关于ILegendClass操作的OMD图
待补充。。。。。