MapX测距问题 在线求高手指点 我现在要做在我自己地图控件 MapControl 里面写个测地图上两点间距离的功能(也就是地图测距功能)有做过的大哥指点下小弟。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知道对你有用不?private double MapZoom; private double CenterX; private double CenterY; private double disSum = 0; private void Form1_Load(object sender, EventArgs e) { this.MapZoom = axMap1.Zoom; this.CenterX = axMap1.CenterX; this.CenterY = axMap1.CenterY; //ce ju li axMap1.CreateCustomTool(100, MapXLib.ToolTypeConstants.miToolTypePoly, MapXLib.CursorConstants.miCrossCursor, null, null, null); } private void axMap1_PolyToolUsed(object sender, AxMapXLib.CMapXEvents_PolyToolUsedEvent e) { if (e.toolNum == 100) { MapXLib.Points pts = (MapXLib.Points)e.points; MapXLib.Point pt1, pt2; for (int i = 1; i < pts.Count; i++) { pt1 = pts._Item(i); pt2 = pts._Item(i + 1); disSum += axMap1.Distance(pt1.X, pt1.Y, pt2.X, pt2.Y); } label1.Text ="距离:"+disSum.ToString("F2"); } } 有用的,我的地图怎么没有Distance方法 这个是要那个引用才能有啊??? 谢谢!找了下using MapInfo.Geometry; 在这里先做下看看 淘宝秒杀器,求思路 多线程 未将对象引用设置到对象的实例 WPF BitmapImage加载大图片报错 如何在WINFORM里得到选取的EXCEL的值 每日一学:让Button中的文字竖着显示 DataGridViewCheckBoxColumn列怎么让checkbox禁用掉啊 跪求Oracle数据库操作基类(存储过程,C#) 有成都的C#前辈吗?我初学C# 想有位老师进行下指导 关于将数据中的值作为复选框 怎么变化控件尺寸 如何实现C#访问LDAP的服务,实现用户名、密码的验证? 针式打印机逐行打印中文不识别
private double MapZoom;
private double CenterX;
private double CenterY;
private double disSum = 0; private void Form1_Load(object sender, EventArgs e)
{
this.MapZoom = axMap1.Zoom;
this.CenterX = axMap1.CenterX;
this.CenterY = axMap1.CenterY;
//ce ju li
axMap1.CreateCustomTool(100, MapXLib.ToolTypeConstants.miToolTypePoly, MapXLib.CursorConstants.miCrossCursor, null, null, null);
} private void axMap1_PolyToolUsed(object sender, AxMapXLib.CMapXEvents_PolyToolUsedEvent e)
{
if (e.toolNum == 100)
{
MapXLib.Points pts = (MapXLib.Points)e.points;
MapXLib.Point pt1, pt2;
for (int i = 1; i < pts.Count; i++)
{
pt1 = pts._Item(i);
pt2 = pts._Item(i + 1);
disSum += axMap1.Distance(pt1.X, pt1.Y, pt2.X, pt2.Y);
}
label1.Text ="距离:"+disSum.ToString("F2");
}
}
找了下
using MapInfo.Geometry; 在这里
先做下看看