c# 进行AE开发时,如何在地图上定位出一个点
2016-09-23 23:50
686 查看
一、文本形式的气泡提示框
由于本人是初学,所以具体的含义尚未弄清楚,直接给出代码吧!/// <summary> /// ARCGIS Label标记 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsmi_MapOperate_LocationMark_Click(object sender, EventArgs e) { ITextElement te = createTextElement(120.85811111, 30.21402778, "潮位站--上虞"); this.axMapControl1.ActiveView.GraphicsContainer.AddElement(te as IElement, 1); this.axMapControl1.Refresh(esriViewDrawPhase.esriViewGraphics, null, null); } public ITextElement createTextElement(double x_longitude, double y_latitude, string text_content) { IBalloonCallout bc = CreateBalloonCallout(x_longitude, y_latitude); IRgbColor color_rgb = new RgbColorClass(); ITextSymbol text_symbol = new TextSymbolClass(); IFormattedTextSymbol ftext_symbol; IPoint point = new PointClass(); ITextElement text_elt = new TextElementClass(); double width, height; IElement e; color_rgb.Green = 255; text_symbol.Color = color_rgb; ftext_symbol = text_symbol as IFormattedTextSymbol; ftext_symbol.Background = bc as ITextBackground; //fts.Size = 8; text_symbol.Size = 8; width = this.axMapControl1.Extent.Width / 13; height = this.axMapControl1.Extent.Height / 20; point.PutCoords(x_longitude + width, y_latitude + height); //IMarkerElement me = new MarkerElementClass(); text_elt.Symbol = text_symbol; text_elt.Text = text_content; e = text_elt as IElement; e.Geometry = point; return text_elt; } public IBalloonCallout CreateBalloonCallout(double x, double y) { IRgbColor color_rgb = new RgbColorClass(); ISimpleFillSymbol simpleFillSbl = new SimpleFillSymbolClass(); IPoint point = new PointClass(); ; IBalloonCallout balloonCallout = new BalloonCalloutClass(); // 气球类型的插图编号 color_rgb.Red = 255; color_rgb.Green = 255; color_rgb.Blue = 200; simpleFillSbl.Color = color_rgb; simpleFillSbl.Style = esriSimpleFillStyle.esriSFSSolid; point.PutCoords(x, y); balloonCallout.Style = esriBalloonCalloutStyle.esriBCSRoundedRectangle; balloonCallout.Symbol = simpleFillSbl; balloonCallout.LeaderTolerance = 10; balloonCallout.AnchorPoint = point; return balloonCallout; }
View Code
参考文章
1. GIS二次开发(C#+AE)
2. ArcEnbine开发之添加标
3. GIS(一)——在js版搜索地图上添加Marker标记
GIS ArcEngine字段标注显示代码 & 可以同时显示多个标注
离线GoogleMapAPIV3加载本地谷歌地图并添加标注
ArcGIS_Engine+C#实例开发教程+添加标注
GIS的学习(二十一)在osmdroid 地图中添加marker 并添加事件
arcEngine经典代码-添加气泡提示框(标注,文本)
Openlayers进阶学习——多标注显示/点击弹出框/图层控制/搜索定位/新增标注等
ArcGIS_Engine+C#实例开发教程+添加标注
GIS空间数据库的建立
ArcMap技巧总结
相关文章推荐
- VB6中如何使用C#开发的WebService进行开发
- 如何使用C#进行Visio二次开发
- 如何使用C#进行Visio二次开发
- [ZT]如何使用C#进行Visio二次开发
- DNN 4.X如何用C#语言进行模块开发
- 用C#两周时间写了一个地图编辑器,兼论C#游戏开发杂谈
- 比如将一个变量转换到INT类型 C#.NET中如何进行强制类型转换
- 如何通过C#开发一个媒体播放器(上)
- 如何通过C#开发一个媒体播放器(中)
- 如何通过C#开发一个媒体播放器(下)
- C#如何打开一个文件夹并定位到某个文件
- 一个C#编写的snmp程序,可使网络管理人员进行参考、开发-A C# Prepared snmp procedures, will enable network managers to carry o
- 如何使用C#进行Visio二次开发
- Q:我欲使用WinDriver开发一个PCI卡的驱动程序来传输图像,但是当我利用WinDriver进行Virtex5 FPGA进行读取和写入动作时,计算机会当机,请问如何解决?
- 如何通过C#开发一个媒体播放器(转)
- 用c#进行directX开发的一个简单例子
- 如何用C#进行Winform MP3播放器开发
- 如何用C#进行Winform MP3播放器开发
- 如何用C#进行Winform MP3播放器开发
- 如何用C#进行Winform MP3播放器开发