比如说,我获取的第一个经纬度是经度116.725,维度是28.241,然后第二个经纬度是经度126.725,维度是23.241,怎么才能知道两地之间相隔的距离,精确到米,求高手解惑,谢谢!!
------解决方案--------------------
http://topic.csdn.net/u/20120125/06/f0c11f62-9a31-4783-bbbc-9ac768c866d4.html?29659
- C# code
MapPoint lonLat2Mercator(MapPoint lonLat) { MapPoint mercator = new MapPoint(); double x = lonLat.X * 20037508.34 / 180; double y = Math.Log(Math.Tan((90 + lonLat.Y) * Math.PI / 360)) / (Math.PI / 180); y = y * 20037508.34 / 180; mercator.X = x; mercator.Y = y; return mercator; }