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 阅读(788)
评论(0) 编辑 收藏 所属分类:
ArcGis