从HTML页面链接到iPhone地图应用程序

too*_*les 10 iphone mobile map-directions

有没有办法从html页面链接到iPhone地图应用程序中的路线?

我们正在添加一个iPhone应用程序,该应用程序将链接到我们网站上的移动页面 - 我们想添加一个方向链接,到目前为止谷歌搜索一直没有发现.

fch*_*sen 13

http://maps.google.com/maps的链接将自动在地图应用中打开

您可以在链接中设置目标地址(daddr)和起始地址(saddr):

http://maps.google.com/maps?daddr=San+Francisco,+CA&saddr=cupertino

您可以在以下位置查看更多选项:

https://developer.apple.com/library/safari/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html


小智 6

这是一个创建链接的javascript函数:

function mapLink(myAddress) {
    return 'http://maps.google.com/maps?q='+escape(myAddress);
}
Run Code Online (Sandbox Code Playgroud)

这在iPhone上运行良好.