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.
我正在实施一个应用程序,在地图上显示客户和我的用户位置。但是现在我有一个问题,因为有很多客户,地图很不舒服。
我如何只能在地图或列表中看到距离我大约 100 公里的图钉?
我希望有人能帮助我吗?
问候马可
您应该将当前位置缓存在 CLLocation* 变量中。您必须使用 [myLoc getDistanceFrom:pinLoc] 计算从该位置添加的每个引脚(注释)的距离,我相信它会返回一个 CLLocationDistance。如果大于 100 公里,请不要将其添加到您的地图中。