如何从用户位置获取坐标?

发布于 2024-08-24 08:28:33 字数 119 浏览 3 评论 0原文

如何从mapView.userLocation获取纬度和经度?

我需要它来获取 userLocation 和地图上另一个点之间的距离。

我希望你能帮助我并提前谢谢你!

How can I get the latitude and longtitude from mapView.userLocation?

I need that to get the distance between userLocation and another point on the map.

I hope you can help me and thank you beforehand!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

懒的傷心 2024-08-31 08:28:33

使用CLLocation中提供的方法:

- (CLLocationDistance)getDistanceFrom:(const CLLocation *)location

Use the method provided in CLLocation:

- (CLLocationDistance)getDistanceFrom:(const CLLocation *)location

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文