AE+C# 图层中增加相应属性标注
if (axMapControl1.LayerCount > )
{
IGeoFeatureLayer pGeoFeatureLayer;
ILineLabelPosition pLineLabelPosition;
ILabelEngineLayerProperties pLabelEngineLayerProperties;
IAnnotateLayerProperties pAnnotateLayerProperties; pGeoFeatureLayer = (IGeoFeatureLayer)axMapControl1.get_Layer();
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 = ;
pTextSymbol.Size = ;
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# 图层中增加相应属性标注的更多相关文章
- AE控制图层中要素可见状态的几种方法
转自原文 AE控制图层中要素可见状态的几种方法 工作中常有这样的需求,一个作业图层由几个作业员来操作,我们要 控制每一个作业员只能看到他负责的区域.作业员的可见区域控制有时候是按空间区域划分,有时候是 ...
- iOS开发——UI篇&文字渐变效果:图层中的mask属性
文字渐变效果:图层中的mask属性 本次文章,主要讲述的是图层中的mask属性,利用它,可以做出文字渐变效果! 一.文字渐变效果: 二.文字渐变实现思路: 1.创建一个颜色渐变层,渐变图层跟文字控件一 ...
- 文字渐变效果:图层中的mask属性
http://www.cocoachina.com/ios/20150716/12571.html 前言 已经很久没写blog了,最近发生了太多事情,失去了生命中一位很重要的成员,使我不得不放下对技术 ...
- [moka同学笔记]Yii2.0给一张表中增加一个属性
1.model中建立关联 public function getUser(){ return$this->hasOne(User::className(),['id'=>'uid']) ; ...
- 如何在属性面板中增加一个属性-UI界面编辑器(XproerUI)教程
版权所有 2009-2015 荆门泽优软件有限公司 保留所有权利 产品首页:http://www.ncmem.com/apps/xproerui/index.asp 开发文档(SkinStudio): ...
- ArcGIS AO中控制图层中要素可见状态的总结
一.DefinitionExpression 实现新建查询图层,查询结果要素为选中状态 该接口可以通过两种方法来控制要素的可见状态. 思路1 通过该接口的 DefinitionExpression 方 ...
- Silverlight用户自定义控件件中增加属性和方法
下面的例子在用户控件MyCpmzSelect中增加了一个myCaption属性 public static readonly DependencyProperty myCaptionProperty ...
- [Effective JavaScript 笔记]第47条:绝不要在Object.prototype中增加可枚举的属性
之前的几条都不断地重复着for...in循环,它便利好用,但又容易被原型污染.for...in循环最常见的用法是枚举字典中的元素.这里就是从侧面提出不要在共享的Object.prototype中增加可 ...
- 在函数中处理html点击事件在标签中增加属性值来解决问题。
随机推荐
- php脚本的执行过程(编译与执行相分离)
php脚本的执行过程(编译与执行相分离) 深入理解PHP代码的执行的过程 PHP程序的执行流程 Apache + PHP 的并发访问
- 通过表达式、函数给React组件属性赋值
一.需求 当有传属性name的值时,则显示Hello "name",否则显示Hello World 二.4种方式的代码实现 1.通过三元运算符 <!DOCTYPE html& ...
- yii2 增加新的目录结构
搭建新的目录结构详细点击这里 搭建Restful API 点击这里 1.开发环境操作系统 Windows Server 2012 R2 DatacenterPHP架构 Ap ...
- [AFN]AFNetworking错误总结
1. 错误打印 code=-1016 filed: text/html 错误原因:AFN默认不能解析请求回来的text/html数据 解决办法: AFN3.0的请看这里 AFHTTPSessionM ...
- 安卓自动化测试之MonkeyRunner环境的搭建
最近在抽时间学习一些安卓自动化的知识,把学到东西都就记录下来,避免以后记性不好忘记,也方便对自己积累知识的查阅 MonkeyRunner是基于坐标点来操作控件的,你可以通过写python脚本来调用mo ...
- python 捕获 shell/bash 脚本的输出结果
#!/usr/bin/python## get subprocess module import subprocess ## call date command ##p = subprocess.Po ...
- [HDOJ5510]Bazinga(并查集)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5510 普通集合会tle,换高贵的并查集. #include <algorithm> #in ...
- HeadFirst Jsp 07 (使用 jsp)
Jsp 变成 Servlet, 容器会查看你的JSP, 把它转换成java源代码, 再编译成完整的Java servlet类. Jsp 不需要你的编译, 容器会自动替换成servlet. 在 jsp中 ...
- RIA技术
Rich Internet Application(富互联网应用程序,简称RIA),一种全新的Web应用程序架构,它结合了桌面软件良好的用户体验和web应用程序易部署的优点,很快获得了企业的青睐. 近 ...
- QQ互发消息
private NewsData data; private void button3_Click(object sender, EventArgs e) //发送 { string x = text ...