ArcEngine+C#画点、线、面-创新互联

IFeatureClass pFeatCls;//好像不能放函数体里面,放里出现提示。
IFeature pFeat;

private void JudgeLayerType()
{
IElement pEle;
//在绘制前,清除mainkMapControl中的任何图形元素
IGraphicsContainer pGra = mainMapControl.Map as IGraphicsContainer;
IActiveView pAcitveView = pGra as IActiveView;
pGra.DeleteAllElements();
//画点

if (pFeatCls.ShapeType == esriGeometryType.esriGeometryPoint )
{
IMarkerElement pMakEle = new MarkerElementClass();
pEle = pMakEle as IElement;
IMarkerSymbol pMakSym = new SimpleMarkerSymbolClass();
pMakSym.Color = this.getRGBColor(0, 0, 255);
pMakEle.Symbol = pMakSym;
pEle.Geometry = pFeat.Shape;
pGra.AddElement(pEle, 0);
pAcitveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
}
//画线
else if (pFeatCls.ShapeType == esriGeometryType.esriGeometryPolyline)
{
ILineElement pLineEle = new LineElementClass();
pEle = pLineEle as IElement;
ILineSymbol pLineSym = new SimpleLineSymbolClass();
pLineSym.Color = this.getRGBColor(0, 0, 255);
pLineSym.Width = 2;
pLineEle.Symbol = pLineSym;
pEle.Geometry = pFeat.Shape;
pGra.AddElement(pEle, 0);
pAcitveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
}
//画面
else if (pFeatCls.ShapeType == esriGeometryType.esriGeometryPolygon)
{
IFillShapeElement pFillShapeEle = new PolygonClass() as IFillShapeElement;
pEle = pFillShapeEle as IElement;
IFillSymbol pFillSym = new SimpleFillSymbolClass();
pFillSym.Color = this.getRGBColor(0, 0, 255);
pFillShapeEle.Symbol = pFillSym;
pEle.Geometry = pFeat.Shape;
pGra.AddElement(pEle, 0);
pAcitveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
}
}

创新互联公司坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都网站建设、成都做网站、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的越秀网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。

文章题目:ArcEngine+C#画点、线、面-创新互联
当前地址:https://www.cdcxhl.com/article42/csjjec.html

成都网站建设公司_创新互联,为您提供ChatGPT服务器托管移动网站建设软件开发面包屑导航网站改版

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

微信小程序开发