Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Bing 地图中画了一个圆圈。现在我需要编写代码来判断一个点(纬度、经度)是在圆圈内还是在圆圈外?
c#.Net 中有算法代码吗?
只需计算distance between the center of the circle and your current coordinate,并将此距离与圆半径进行比较(距离 <= 半径表示坐标在圆内)。
distance between the center of the circle and your current coordinate
要计算两点之间的距离,请使用Haversine 公式。
您将在此处找到 C# 实现。