I am working now on ArcObject .Net to develop an gis application , i need your help in certain area , i can now get Polygon corner (vertices ) but how i can show the corner /vertices as graphic with it's label .
any help or advice Plz.
This what i meant :
Have look at AddTextElement method in this sample ArcObjects 10 .NET SDK Help .
Iterate through your polygon vertices by casting it as IPointCollection to get vertex geometry.
Here is a small piece of code that does what you need. The code should work as it is pretty simple and I have not tested even for compilation. But this should get you started with ArcObjects.
//Get the Polygon from the Feature.Shape property
public void AddPolygonVertexText(IMap map, IPolygon polygon)
IPointCollection ptCollection = (IPointCollection)polygon;
IPoint outPoint=new PointClass();
IGraphicsContainer graphicsContainer = map as IGraphicsContainer;
((IActiveView)map).PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
//Creates a TextElement and sends the result to the calling class
private ITextElement AddTextElement(IPoint pt,string labelTxt)
IElement element = new TextElementClass();
ITextElement textElement = element as ITextElement;
IPoint point = new PointClass();
point.X = pt.X;
point.Y = pt.Y;
element.Geometry = point;
textElement.Text = labelText;
Retrieving data ...