ArcEngine中UID使用资料收集

it2024-10-28  11

ArcEngine中getLayer方法的UID参数的详解

UID中value的几种值以及表示的意思:

{6CA416B1-E160-11D2-9F4E-00C04F6BC78E} IDataLayer

{40A9E885-5533-11d0-98BE-00805F7CED21} IFeatureLayer

{E156D7E5-22AF-11D3-9F99-00C04F6BC78E} IGeoFeatureLayer

{34B2EF81-F4AC-11D1-A245-080009B6F22B} IGraphicsLayer

{5CEAE408-4C0A-437F-9DB3-054D83919850} IFDOGraphicsLayer

{0C22A4C7-DAFD-11D2-9F46-00C04F6BC78E} ICoverageAnnotationLayer

{EDAD6644-1810-11D1-86AE-0000F8751720} IGroupLayer

例:

[html] view plain copy private bool IsLayerExist(string layerName)  {      UID uid = new UIDClass();      uid.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"; // 代表只获取矢量图层      IEnumLayer layers = mapControl.get_Layers(uid, true);              ILayer layer;      while(layer = layers.Next() != null)      {          if (layer.Name == layerName)          {              return true;          }      }        return false;  }  转载自: http://blog.csdn.net/zy332719794/article/details/7469477

http://blog.sina.com.cn/s/blog_4f9387ab0100i2ag.html http://hi.baidu.com/steeeeps/item/103d0a491ed33408c116138d  

转载于:https://www.cnblogs.com/wuhenke/archive/2012/07/02/2573190.html

相关资源:数据结构—成绩单生成器
最新回复(0)