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.
我有当前位置的纬度和经度。我想检查目标位置(纬度和经度)是否接近当前位置半径 50 米。
我是android的新手。如果有人对此有解决方案。请回复。
使用内置的距离计算:
Location loc; ..... float radius = 50.0; float distance = loc.distanceTo(loc2); if (distance < radius) then inside.