随笔-18  评论-20  文章-0  trackbacks-0

ArcGIS Server开发——标注

[C#写法]
private void LabelField(IFeatureLayer pFeatureLayer,IServerContext pServerContext)
  { 
   IGeoFeatureLayer pGeoFeatureLayer = pFeatureLayer as IGeoFeatureLayer;
   pGeoFeatureLayer.AnnotationProperties.Clear();
   IAnnotateLayerPropertiesCollection pAnnoLayerPropsColl = pGeoFeatureLayer.AnnotationProperties;
   ILabelEngineLayerProperties pLabelEngine;
   
   pLabelEngine = pServerContext.CreateObject("esriCarto.LabelEngineLayerProperties") as     ILabelEngineLayerProperties;
   pLabelEngine.Expression = "[Field]";
   IAnnotateLayerProperties pAnnoLayerProps = pLabelEngine as IAnnotateLayerProperties;
   pAnnoLayerPropsColl.Add(pAnnoLayerProps);
   pGeoFeatureLayer.DisplayAnnotation = true;  
  

posted on 2007-08-16 11:10 JavaPoint 阅读(790) 评论(0)  编辑  收藏 所属分类: ArcGis

只有注册用户登录后才能发表评论。


网站导航: