在iOS上计算地图上2点之间的距离

编程入门 行业动态 更新时间:2024-10-27 07:30:23
本文介绍了在iOS上计算地图上2点之间的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以使用Apple Map框架或Google框架计算iOS上两个封闭点之间的距离? 例如,我想以最高的准确度获得这2个蓝点之间的距离。

Is it possible to calculate the distance between 2 close points on iOS using Apple map framework or Google framework? For example, i want to get the distance between this 2 blu point with the highest accuracy possible.

使用Google地图或苹果地图能否获得很多数字的2坐标?我如何计算以厘米或毫米为单位的距离?

Using google maps or apple maps can i get the 2 coordinate with a lot of digit? how can i calculate the distance in centimeters or millimeters?

推荐答案

尝试一下-

let coordinate0 = CLLocation(latitude: 5.0, longitude: 5.0) let coordinate1 = CLLocation(latitude: 5.0, longitude: 3.0) let distanceInMeters = coordinate0.distance(from: coordinate1)

更多推荐

在iOS上计算地图上2点之间的距离

本文发布于:2023-10-27 22:34:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1534748.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图上   距离   iOS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!