原文 AE+C# 图层中增加相应属性标注

  1. if (axMapControl1.LayerCount > )
  2. {
  3. IGeoFeatureLayer pGeoFeatureLayer;
  4. ILineLabelPosition pLineLabelPosition;
  5. ILabelEngineLayerProperties pLabelEngineLayerProperties;
  6. IAnnotateLayerProperties pAnnotateLayerProperties;
  7.  
  8. pGeoFeatureLayer = (IGeoFeatureLayer)axMapControl1.get_Layer();
  9. pGeoFeatureLayer.AnnotationProperties.Clear();
  10.  
  11. pLineLabelPosition = new LineLabelPosition();
  12. pLineLabelPosition.Above = false;
  13. pLineLabelPosition.AtEnd = false;
  14. pLineLabelPosition.Below = false;
  15. pLineLabelPosition.Horizontal = false;
  16. pLineLabelPosition.InLine = true;
  17. pLineLabelPosition.OnTop = true;
  18. pLineLabelPosition.Parallel = true;
  19. pLineLabelPosition.ProduceCurvedLabels = true;
  20.  
  21. ITextSymbol pTextSymbol = new TextSymbol();
  22. IColor pColor = new RgbColor();
  23. pColor.RGB = ;
  24. pTextSymbol.Size = ;
  25. pTextSymbol.Font.Name = "宋体";
  26. pTextSymbol.Color = pColor;
  27.  
  28. pLabelEngineLayerProperties = new LabelEngineLayerProperties() as ILabelEngineLayerProperties;
  29. pLabelEngineLayerProperties.Symbol = pTextSymbol;
  30. pLabelEngineLayerProperties.IsExpressionSimple = true;
  31. pLabelEngineLayerProperties.Expression = "[NAME]";//需要中括号,这里显示NAME字段属性
  32. pLabelEngineLayerProperties.BasicOverposterLayerProperties.LineLabelPosition = pLineLabelPosition;
  33.  
  34. pAnnotateLayerProperties = (IAnnotateLayerProperties)pLabelEngineLayerProperties;
  35. pAnnotateLayerProperties.DisplayAnnotation = true;
  36. pAnnotateLayerProperties.FeatureLayer = pGeoFeatureLayer;
  37.  
  38. pAnnotateLayerProperties.LabelWhichFeatures = esriLabelWhichFeatures.esriAllFeatures;
  39. pAnnotateLayerProperties.WhereClause = "";
  40.  
  41. pGeoFeatureLayer.AnnotationProperties.Add(pAnnotateLayerProperties);
  42. pGeoFeatureLayer.DisplayAnnotation = true;
  43. axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
  44. }

AE+C# 图层中增加相应属性标注的更多相关文章

  1. AE控制图层中要素可见状态的几种方法

    转自原文 AE控制图层中要素可见状态的几种方法 工作中常有这样的需求,一个作业图层由几个作业员来操作,我们要 控制每一个作业员只能看到他负责的区域.作业员的可见区域控制有时候是按空间区域划分,有时候是 ...

  2. iOS开发——UI篇&文字渐变效果:图层中的mask属性

    文字渐变效果:图层中的mask属性 本次文章,主要讲述的是图层中的mask属性,利用它,可以做出文字渐变效果! 一.文字渐变效果: 二.文字渐变实现思路: 1.创建一个颜色渐变层,渐变图层跟文字控件一 ...

  3. 文字渐变效果:图层中的mask属性

    http://www.cocoachina.com/ios/20150716/12571.html 前言 已经很久没写blog了,最近发生了太多事情,失去了生命中一位很重要的成员,使我不得不放下对技术 ...

  4. [moka同学笔记]Yii2.0给一张表中增加一个属性

    1.model中建立关联 public function getUser(){ return$this->hasOne(User::className(),['id'=>'uid']) ; ...

  5. 如何在属性面板中增加一个属性-UI界面编辑器(XproerUI)教程

    版权所有 2009-2015 荆门泽优软件有限公司 保留所有权利 产品首页:http://www.ncmem.com/apps/xproerui/index.asp 开发文档(SkinStudio): ...

  6. ArcGIS AO中控制图层中要素可见状态的总结

    一.DefinitionExpression 实现新建查询图层,查询结果要素为选中状态 该接口可以通过两种方法来控制要素的可见状态. 思路1 通过该接口的 DefinitionExpression 方 ...

  7. Silverlight用户自定义控件件中增加属性和方法

    下面的例子在用户控件MyCpmzSelect中增加了一个myCaption属性 public static readonly DependencyProperty myCaptionProperty ...

  8. [Effective JavaScript 笔记]第47条:绝不要在Object.prototype中增加可枚举的属性

    之前的几条都不断地重复着for...in循环,它便利好用,但又容易被原型污染.for...in循环最常见的用法是枚举字典中的元素.这里就是从侧面提出不要在共享的Object.prototype中增加可 ...

  9. 在函数中处理html点击事件在标签中增加属性值来解决问题。

随机推荐

  1. ios开发--tcp/ip

    简介 该篇文章主要回顾--TCP/IP协议族中的TCP/UDP.HTTP:还有Socket.(--该文很干,酝酿了许久!你能耐心看完吗?) 我在这个文章中,列举了常见的TCP/IP族中的协议,今天主角 ...

  2. BufferedReader方法-----Scanner方法

    import java.io.*; import java.util.Scanner; public class C { public static void main(String []args) ...

  3. ubuntu sh脚本双击运行

    自从13.04以后,双击sh脚本文件就已经默认是geidt打开了,要想运行,从nautilus-->文件-->首选项-->行为-->可执行文件 有三个选项,默认是第二个,如果想 ...

  4. linux中U盘umonut时出现“Device is busy”的解决方法

    问题: #umount /dev/sda1 umount: /mnt/usb: device is busy 查找占用目录进程: #lsof |grep /mnt/usb bash 1971 root ...

  5. C语言:指针的几种形式二

    一.const指针 1.const int* p和int const* p:两者意义是相同的.指向的内容是只读数据,不可以q改变:但是指向的地址可以改变. 2.int* const p:必须先对指针初 ...

  6. hive0.13网络接口安装

    安装好hive 0.13以后,在./lib下找不到hive-hwi-0.13.1.war   ,那该怎么办? 1.下载hive-0.12.0版本,把这一版里面的hive-hwi-0.12.0.war重 ...

  7. PHP代码优化技巧大盘点

    PHP优化的目的是花最少的代价换来最快的运行速度与最容易维护的代码.本文给大家提供全面的优化技巧. 1.echo比print快. 2.使用echo的多重参数代替字符串连接. 3.在执行for循环之前确 ...

  8. TestNG超详细教程

    testNG官网:http://testng.org/doc/download.html howtodoinjava.com里的testNG教程,简单详细:http://howtodoinjava.c ...

  9. 在LINUX上创建GIT服务器【转】

    转自:http://blog.csdn.net/xiongmc/article/details/9176785 如果使用git的人数较少,可以使用下面的步骤快速部署一个git服务器环境. 1. Cli ...

  10. iPhone(iOS设备) 无法更新或恢复时, 如何进入恢复模式

    在更新或恢复 iPhone  时,如果遇到以下所列问题之一.可能就要将设备置于恢复模式,并尝试重新恢复设备. 设备不断地重新启动,但从未显示主屏幕. 无法完成更新或恢复,且 iTunes 不再能识别设 ...