江西理工大学–DevelopingGISApplications.ppt

  1. 1、本文档共216页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
江西理工大学–DevelopingGISApplications

Patch是一个Legend Class中的帮助描述要素着色的图片,这个对象只有两种形式:AreaPatch和 LinePatch。ArcObjects使用LegendClassFormat和 LegendFormat对象来管理一个图例项内的 Patch对象。 LegendItem对象有多种类型:HorizontalBarLegendItem、HorizontalLegendItem、NestedLegendItem和VerticalLegendItem。 LegendItem对象默认实现ILegendItem接口,这个接口定义了所有LegendItem的一般属性,如是否显示标题、是否显示标签,是否出现图层名以及LegendItem的宽度和高度等。 LegendItem的四个子类都有各自相应的接口,如 HorizontalBarLegendItem的接口为IHorizontalBarLegendItem等,使用这些接口可以方便的定制不同类型的图例条目。 LegendClassFormat对象用于控制单个legendItem的外观,如 DescriptionSymbol、LinePatch和Patch的属性等。LegendFormat对象用于控制一个legend的属性,特别是legend内不同部分的间隔大小。 通过TOCControl改变图例符号 在ArcMap的“Table Of Contents”中点击某个图例符号就会弹出“Symbol Selector”对话框,通过这一对话框可以改变相应要素符号表达。在利用ArcGIS Engine开发的应用程序中,如何通过TOCControl控件实现类似功能? 基本思路如下: 对axTOCControl1的OnMouseDown写处理代码,主要功能包括: 使用HitTest()方法获得鼠标点击位置的图例符号symbol; 根据得到的图例符号symbol的几何类型(点、线、面),通过“Symbol Selector”对话框改变图例符号; 刷新相关控件,包括axMapControl1和axTOCControl1。 public void HitTest ( ????int X, ????int Y, ????ref esriTOCControlItem ItemType, ????ref IBasicMap BasicMap, ????ref ILayer Layer, ????ref object Unk, ????ref object Data ); Unk specifies an ILegendGroup object. Data specifies a long indicating the index of the legend class within the legend group. Use this index in conjunction with the legend group to obtain a particular legend class. An index of -1 refers to the heading if it is present. private void axTOCControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.ITOCControlEvents_OnMouseDownEvent e) {…… //Determine what kind of item has been clicked on axTOCControl1.HitTest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index); if (e.button == 1) { if (layer == null) return; IFeatureLayer featureLayer = layer as IFeatureLayer; if (featureLayer == null) return; IGeoFeatureLayer geoFeatureLayer = (IGeoFeatureLayer)featureLayer; ILegendClass legendClass = new LegendClassClass(); ISymbol symbol = null;

文档评论(0)

sunshaoying + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档