概述
小马哥淡定 原文 ARCGIS动态画点
private void DrawPointOnMap(double x, double y,bool clear) { IMapControl2 pMapCtrl = (IMapControl2)mapCtrl.Object; IGraphicsLayer pGraphicsLyr = mapCtrl.Map.BasicGraphicsLayer; IActiveView pView = mapCtrl.ActiveView; IGraphicsContainer pGraphicsContainer = (IGraphicsContainer)pGraphicsLyr; IPoint pnt = new PointClass(); pnt.X = x; pnt.Y = y; IScreenDisplay pDisp = pView.ScreenDisplay; pDisp.StartDrawing(pDisp.hDC, (short)(ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache)); pDisp.SetSymbol(new SimpleMarkerSymbolClass()); //下面两句关键 pGraphicsContainer.DeleteAllElements(); pView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); pDisp.DrawPoint(pnt); pDisp.FinishDrawing(); // When FinishDrawing is called, all the caches get flushed to the screen. FinishDrawing must be called before StartDrawing can be called again. IMarkerElement pMkElmt = new MarkerElementClass(); IElement pElmt = (IElement)pMkElmt; pMkElmt.Symbol = new SimpleMarkerSymbolClass(); pElmt.Geometry = pnt; pGraphicsContainer.AddElement(pElmt, 0); IGeometry geo = pElmt.Geometry; //mapCtrl.FlashShape(geo, 5, 1000, null); }
最后
以上就是甜蜜面包为你收集整理的ARCGIS动态画点的全部内容,希望文章能够帮你解决ARCGIS动态画点所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复