使用Text Symbol 符号化标注道路名称
来源:互联网 发布:最优化漂移 编辑:程序博客网 时间:2024/05/29 16:59
部分代码:
public static void LayersofLabelSymol(IFeatureLayer mIFeatureLayer,string SymbolFileName ,string strCategory,string SymbolName,string lableFieldsName,int symbol_size,int symbol_offset, System.Drawing.Font LableFont, IRgbColor FontColor, IActiveView mIActiveView)
{
IGeoFeatureLayer pGeoFeatureLayer = (IGeoFeatureLayer)mIFeatureLayer;
IAnnotateLayerPropertiesCollection pCollection;
pCollection = pGeoFeatureLayer.AnnotationProperties;
pGeoFeatureLayer.AnnotationProperties.Clear();
ILabelEngineLayerProperties pEngine = new LabelEngineLayerPropertiesClass();
int i = pGeoFeatureLayer.FeatureClass.Fields.FindField(lableFieldsName);
string lableFields = pGeoFeatureLayer.FeatureClass.Fields.get_Field(i).Name;
if (lableFields == "SHAPE.len")
{
pEngine.Expression = "round(" + "[" + lableFields + "]" + ")";
}
else
{
pEngine.Expression = "[" + lableFields + "]";
}
//string SymbolFileName = "底图符号.ServerStyle";
//string SymbolName = "国道";
//string strCategory = "Text Symbols";
pEngine.Symbol = (ITextSymbol)Get_Symbol(SymbolFileName, SymbolName, strCategory);//根据符号库名、符号名称获取符号
pEngine.Symbol.Size = symbol_size;
//pEngine.Symbol.HorizontalAlignment = esriTextHorizontalAlignment.esriTHACenter;
//pEngine.Symbol.VerticalAlignment = esriTextVerticalAlignment.esriTVACenter;
IAnnotateLayerProperties pLabelEngine = (IAnnotateLayerProperties)pEngine;
pLabelEngine.FeatureLayer = pGeoFeatureLayer;
ITextSymbol pTextSymbol = pEngine.Symbol;
ISimpleTextSymbol simpleTextSymbol = (ISimpleTextSymbol) pTextSymbol;
simpleTextSymbol.YOffset = symbol_offset;//设置符号Y轴偏移量
simpleTextSymbol.VerticalAlignment=esriTextVerticalAlignment.esriTVACenter;//没多大用
IFontDisp pFont = (IFontDisp)ESRI.ArcGIS.ADF.COMSupport.OLE.GetIFontDispFromFont(LableFont);
pTextSymbol.Font = pFont;
pTextSymbol.Color = (IColor)FontColor;
pEngine.Symbol = pTextSymbol;
pLabelEngine.DisplayAnnotation = true;
pLabelEngine.LabelWhichFeatures = esriLabelWhichFeatures.esriVisibleFeatures;
pCollection.Add(pLabelEngine);
pGeoFeatureLayer.DisplayAnnotation = true;
ITrackCancel pCon = new CancelTrackerClass();
pCon.Continue();
pGeoFeatureLayer.Draw(esriDrawPhase.esriDPAnnotation, mIActiveView.ScreenDisplay, pCon);
}
- 使用Text Symbol 符号化标注道路名称
- 符号化Symbol(符号)体系
- 符号化Symbol(符号)体系
- android 系统软件名称标注
- POS标注名称含义
- ArcGIS Engine开发教程之图层符号化(三)——符号化Symbol(符号)体系
- ArcGIS Engine开发教程之图层符号化(三)——符号化Symbol(符号)体系
- Maplex高级标注控制—道路压盖
- 教你操作道路沿线标注
- 如何实现道路沿线标注的效果
- 使用Input Text with LOV 实现显示名称保存ID
- Python使用XML操作mapnik,实现复杂标注(Multi line text symbolizer)
- arcgis api for flex 设置 TextSymbol 竖排字 道路标注
- [Style]Geoserver沿道路方向显示中文标注
- Symbol Mc1000 Text文本阅读器整体代码
- Symbol Mc1000 Text文本阅读器整体代码
- JPA标注的使用
- 使用注解标注Servlet
- 理解Session State模式+ASP.NET SESSION丢失FAQ
- Asp.Net自定义分页控件(前台/后台)有图
- 想起来的爱情
- Windows XP中开启UPnP功能
- /proc文件系统简介
- 使用Text Symbol 符号化标注道路名称
- Decode the Strings
- 如何更改桌面的路径,以防灾难数据丢失
- c# String 前面不足位数补零的方法
- Windows Mobile开发环境搭建指南
- swing wpython 防MSN无边界后 照样可以拖拽和关闭
- 6个你必须用到AJAX的地方与6个不必用到的地方
- 用NextInstaller制做B/S 系统的安装盘(www.atopsoft.net)
- 用 jQuery + Ajax 实现 Google 的输入提示功能