AE+C# 图层中增加相应属性标注
2016-10-31 19:53
148 查看
原文 AE+C# 图层中增加相应属性标注
if (axMapControl1.LayerCount > 0) { IGeoFeatureLayer pGeoFeatureLayer; ILineLabelPosition pLineLabelPosition; ILabelEngineLayerProperties pLabelEngineLayerProperties; IAnnotateLayerProperties pAnnotateLayerProperties; pGeoFeatureLayer = (IGeoFeatureLayer)axMapControl1.get_Layer(0); pGeoFeatureLayer.AnnotationProperties.Clear(); pLineLabelPosition = new LineLabelPosition(); pLineLabelPosition.Above = false; pLineLabelPosition.AtEnd = false; pLineLabelPosition.Below = false; pLineLabelPosition.Horizontal = false; pLineLabelPosition.InLine = true; pLineLabelPosition.OnTop = true; pLineLabelPosition.Parallel = true; pLineLabelPosition.ProduceCurvedLabels = true; ITextSymbol pTextSymbol = new TextSymbol(); IColor pColor = new RgbColor(); pColor.RGB = 255; pTextSymbol.Size = 8; pTextSymbol.Font.Name = "宋体"; pTextSymbol.Color = pColor; pLabelEngineLayerProperties = new LabelEngineLayerProperties() as ILabelEngineLayerProperties; pLabelEngineLayerProperties.Symbol = pTextSymbol; pLabelEngineLayerProperties.IsExpressionSimple = true; pLabelEngineLayerProperties.Expression = "[NAME]";//需要中括号,这里显示NAME字段属性 pLabelEngineLayerProperties.BasicOverposterLayerProperties.LineLabelPosition = pLineLabelPosition; pAnnotateLayerProperties = (IAnnotateLayerProperties)pLabelEngineLayerProperties; pAnnotateLayerProperties.DisplayAnnotation = true; pAnnotateLayerProperties.FeatureLayer = pGeoFeatureLayer; pAnnotateLayerProperties.LabelWhichFeatures = esriLabelWhichFeatures.esriAllFeatures; pAnnotateLayerProperties.WhereClause = ""; pGeoFeatureLayer.AnnotationProperties.Add(pAnnotateLayerProperties); pGeoFeatureLayer.DisplayAnnotation = true; axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); }
相关文章推荐
- AE+C#通过多线程向GlobeControl中增加图层
- C# WCF WinCE 解决方案 错误提示之:已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- 关于C#中“已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。”
- 若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- 错误提示之:已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- C#+AE写的一段加载图层
- 在C#中应用MapObjects(图层标注)
- 修改图层的symbol(AE+C#)
- C#+AE 调整TOCControl控件中图层的显示顺序
- AE+C#开发问题之二——axTOCControl控件图层不显示问题
- 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
- AE+C#向IPageLayout中增加比例尺
- (C#)为 TextBox 控件增加一个限制最大字节数的属性
- C#+AE:如何用TreeList控件实现属性查询
- C#+AE 实现点击查询属性功能
- C# + AE 判断图层类型
- AE实现不同图层的合并C#代码
- 这么详细的分类 C# / C Sharp源代码网站你见过没有? C# / C Sharp中的每一个方法,每一个操作,每一个函数,每一个类.每一个属性,每一个事件都有相应的范例代码
- 在C#中应用MapObjects(图层标注)
- AE+C#向IPageLayout中增加图例框