为什么 MKMapView 中放置在相同纬度和经度的图钉与 Google 地图中的图钉不同?

发布于 2024-08-24 02:05:38 字数 77 浏览 4 评论 0原文

我在带有经度和纬度的 MKMapView 中放置了一个图钉。当我在谷歌地图上放置相同的经度和纬度时,两者上的图钉略有不同。

I drop a pin in an MKMapView with longitude and latitude. When I place same longitude and latitude on google map the pin on both are slightly different.

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

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

发布评论

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

评论(1

你列表最软的妹 2024-08-31 02:05:38

我有一个网站/iPhone 应用程序渲染来自同一数据库的位置地图,但尚未发现此问题。我会检查您的假设:

  • 您是否通过网络截断了您的值?
  • 您在两个平台上对头寸值的舍入方式是否不同?
  • 通过记录和比较来检查您传递到 Google 地图和 MapKit 的值。

从以下屏幕截图中您可以看到,相同的纬度/经度呈现在地图上的相同位置:

alt text
alt text

更新

尝试了您在评论中提到的坐标,并得到了相同的位置。你需要检查你的假设。您在网络或设备上使用的值不是您认为的值:

alt text

I have a web/iPhone app that renders a map for positions sourced from the same database and haven't seen this issue. I would check your assumptions:

  • Are you truncating your values over the wire?
  • Are you rounding the position values differently on the two platforms?
  • Check the values you are passing into Google Maps and MapKit by logging them and comparing.

You can see from the following screenshots that the same latitude/longitude are rendered on the same position on the map:

alt text
alt text

Update

I tried the coordinates you mentioned in the comments and got the same position for both. You need to check your assumptions. The values that you are using on the web or on the device are not the values you think they are:

alt text

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