ArcGIS绘制点 线 文字

ArcGis操作

1、绘制点

public IElement DrawPoint(double longitude,double latitude,Color pointColor,int pointSize,MapControl mapControl)

{

IMarkerElement markerElement =new MarkerElement() as IMarkerElement;

ISimpleMarkerSymbol simpleMarkerSymbol=new SimpleMarkerSymbol();

simpleMarkerSymbol.Size=pointSize;

simpleMarkerSymbol.Outline=true;

simpleMarkerSymbol.OutlineColor=GetColor(pointColor);

simpleMarkerSymbol.OutlineSize=1;

IColor c=new RgbColor();

c.NullColor=true;

simpleMarkerSymbol.Color=c;

simpleMarkerSymbol.Style=esriSimpleMarkerStyle.esriSMSCircle;

markerElement.Symbol=simpleMarkerSymbol;

IElement routePointElement=(IElement)markerElement;

IPoint myPoint=new ESRE>ArcGIS.Geometry.point();

myPoint.PutCoords(longitude,latitude);

routePointElement.Geometry=myPoint;

mapControl.ActiveView.GraplicsContainer.AddElement(routePointElement,0);

mapControl.ActiveView.GraplicsContainer.PartialRefresh(esriViewDrawPhase.esriViewGraplics,routePointElement,null);

return routePointElement;

}

posted @ 2013-01-10 22:46  天之泉  阅读(569)  评论(0编辑  收藏  举报