创建专题图及图例 (mapxtreme2008&C#)
//创建专题图
IndividualValueTheme thm = new IndividualValueTheme(MyLayer, "某字段", "xx");
MyLayer.Modifiers.Append(thm);
//图例
FeatureLayer fl = new FeatureLayer(MapInfo.Engine.Session.Current.Catalog.GetTable("MyLayer"));
System.Drawing.Size size = new Size(300, 300);
MapInfo.Mapping.Legends.LegendFactory lfa = MainMap.Map.Legends;
MapInfo.Mapping.Legends.Legend legend = lfa.CreateLegend(size);
MapInfo.Mapping.Legends.LegendFrame fra = MapInfo.Mapping.Legends.LegendFrameFactory.CreateThemeLegendFrame(thm);
legend.Frames.Append(fra);
legendControl1.Legend = legend;