ARCGIS动态画点

简介:

小马哥淡定 原文 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);

}
复制代码

 

没有整理与归纳的知识,一文不值!高度概括与梳理的知识,才是自己真正的知识与技能。 永远不要让自己的自由、好奇、充满创造力的想法被现实的框架所束缚,让创造力自由成长吧! 多花时间,关心他(她)人,正如别人所关心你的。理想的腾飞与实现,没有别人的支持与帮助,是万万不能的。



    本文转自wenglabs博客园博客,原文链接:http://www.cnblogs.com/arxive/p/6110196.html ,如需转载请自行联系原作者


相关文章
|
12月前
|
人工智能 数据可视化 API
ArcGIS API for Python
ArcGIS API for Python
60 0
|
JavaScript 前端开发 应用服务中间件
Arcgis api for javascript 详细部署
Arcgis api for javascript 详细部署
|
人工智能 数据可视化 数据管理
ArcGIS API for Python
ArcGIS API for Python
104 0
|
数据可视化 数据管理 API
​​​​​​​ARCGIS API for Python进行城市区域提取
​​​​​​​ARCGIS API for Python进行城市区域提取
​​​​​​​ARCGIS API for Python进行城市区域提取
arcgis api 3.X 修改自带弹窗样式 2022年6月12日
自带的弹窗介绍: arcgis api 3.X 修改自带弹窗样式插图 /*修改原有弹窗的css样式*/ /* 弹窗整体 */ .esriPopup { font-size: 16px; box-shadow: 10px 10px 5px #888888; } .esriPopup .sizer { position: relative; width: 400px; /* 弹窗宽度 */ z-index: 1; } /* 标题部分 */ .esriPopup .titlePane { background-color: rgba(7
|
JavaScript 前端开发 定位技术
ArcGIS API For JavaScript官方文档(六)之设置范围
ArcGIS API For JavaScript官方文档(六)之设置范围
|
存储 JSON 前端开发
ArcGIS API For JavaScript官方文档(一)之默认API配置
ArcGIS API For JavaScript官方文档(一)之默认API配置
|
JSON JavaScript API
geoserver图层属性查询及查询结果转换为arcgis js api能使用的格式
一个项目使用了ArcGIS JS API开发GIS展示层,但GIS服务使用了Geoserver,这时加载Geoserver数据和查询数据就和之前完全不一样了,以下介绍下我使用ArcGIS JS API+Geoserver开发过程中解决Geoserver图层属性查询的一个方案。
1344 0
下一篇
无影云桌面