/// <summary> /// 设置界址线标注 /// </summary> /// <param name="map"></param> /// <param name="jzxs"></param> public static void SaveJZXBZMap(IMap map, IList <JZX> jzxs) { ITextSymbol textSymbol = ArcGisUtils.CreateTextSymbol(10, "宋体"); IGraphicsContainer pGraph = map as IGraphicsContainer; foreach (JZX jzx in jzxs) { string bz = jzx.QLR + "\n" + jzx.BM; if (bz != null) { bz = bz.Replace("成都高新区", ""); IPointCollection pc = jzx.Polyline as IPointCollection; IPoint pt = ArcGisUtils.GetPolyCore(pc); var textELment = ArcGisUtils.CreateTextElement(bz, pt, textSymbol); pGraph.AddElement(textELment as IElement, 0); } } }
/// <summary> /// 增加界址点标注 /// </summary> /// <param name="groupJTSYQ"></param> public static void SaveJZDBZMap(IMap map, IList <JZD> jzds) { ITextSymbol textSymbol = ArcGisUtils.CreateTextSymbol(10, "宋体"); IGraphicsContainer pGraph = map as IGraphicsContainer; IList <IFeatureLayer> layers = new List <IFeatureLayer>(); for (int a = 0; a < map.LayerCount; a++) { layers.Add(map.Layer[a] as IFeatureLayer); } foreach (JZD jzd in jzds) { string bz = "J" + jzd.JZDH; if (bz != null) { IPoint pt = GetBZPoint(jzd, layers); ITextElement textELment = ArcGisUtils.CreateTextElement(bz, pt, textSymbol); pGraph.AddElement(textELment as IElement, 0); } } }