c#.Net中的Circlular Geofencing

时间:2012-07-30 12:35:45

标签: c# bing-maps geofencing

我在Bing地图中画了一个圆圈。现在我需要编写代码(纬度,经度)是在圆圈的内部还是外部?

c#.Net中是否有任何算法代码?

1 个答案:

答案 0 :(得分:5)

只需计算distance between the center of the circle and your current coordinate,并将此距离与圆半径进行比较(距离< =半径表示坐标位于圆内)。

要计算两点之间的距离,请使用Haversine formula

你会找到一个C#实现here