iPhone 使用字符串“当前位置”链接到地图方向Saddr 的不是 lat 和 lng

发布于 2024-09-01 15:56:14 字数 379 浏览 2 评论 0原文

我知道关于如何构建指向地图应用程序的共享应用程序链接(指定带有坐标的开始和结束地址)有很多问题。我已经做到了,工作没有问题。

有没有人找到一种方法来链接通常指定为“当前位置”的源地址。

我问这个问题是因为我正在处理的场景只有在切换到地图应用程序之前确定用户位置时才需要使用 Core Location 或 UIMapView ,其中用户定位似乎会再次发生。

我尝试将UTF8的“当前位置”和“[当前位置]”放入saddr参数中,该参数有趣地从当前蒙大拿州开始。我也尝试过简单地排除 Saddr 参数。

我知道这通常是涉足领域,但我在此处或 mapki 上搜索的任何内容均未涵盖这种特殊情况。在添加核心位置代码之前,我只是想确保没有更有限的方法来解决这个问题。

谢谢

I know there are numerous questions about how to construct a sharedApplication link to the maps app specifying the start and end address with coordinates. I've got that working no problem.

Has anyone found a way to link with a source address generically specified as "current location".

I ask because the scenario I'm working on having Core Location or a UIMapView would only be necessary in order to determine the user location prior to handing off to the map app where the user locating would seem to just happen again.

I've tried throwing UTF8'd "Current Location" and "[Current Location]" into the saddr parameter which amusingly starts from Current Montana. I've also tried simply excluding the saddr param.

I know this is often tread territory but this particular situation wasn't covered by anything I found searching here or on mapki. Before I add the core location code I just wanted to make sure there wasn't a more limited way to tackle this.

Thanks

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

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

发布评论

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

评论(1

原野 2024-09-08 15:56:14

这篇文章已经很老了,但最近我不得不面对类似的问题,并且我开发了一个解决方案。

使用“当前位置”(正确转义)作为源地址效果很好。
缺点是“当前位置”仅适用于英语。如果您的 iPhone 设置为使用另一种语言,您需要知道 Apple 为该特定语言选择的确切翻译。

我编写了一个类,可以以任何支持的语言提供“当前位置”的精确翻译。您可以阅读关于此的我的博客文章

希望这有帮助。

This post is quite old, but recently I had to face a similar issue and I developed a solution.

Using "Current Location" (properly escaped) as source address works perfectly.
The downside is that "Current Location" is valid for English language only. If your iPhone is set to use another language, you need to know the exact translation that Apple chose for that particular language.

I wrote a class that can provide the exact translation for "Current Location" in any supported language. You can read my blog post about this.

Hope this helps.

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