简体   繁体   中英

Location Services iPhone

what is the best way to determine if two iPhone users are in the same radius of lets say 1000 meters.

What I am thinking is, both phones find out there location, then submit it to a central server. The problem is how would I figure out if they are within a certain distance of each other.

使用服务器上的Haversine公式可以粗略估算距离,并仅提供最接近客户电话的4或5,然后使用CLLocation上的distanceFromLocation:方法(仅发送几条记录)即可获得更准确的距离由服务器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM