确保链接到 iPhone 上的 Google 地图时显示底部栏
我正在使用 jQuery Mobile 并从网页链接到 Google 地图(作为外部链接)。我希望底部栏在地图中可见,以便用户可以点击后退按钮。
如果链接如下所示,则此方法有效:
<a rel="external" target="_" href="http://maps.google.co.uk">Text</a>
但是,如果是这样
<a rel="external" target="_" href="http://maps.google.co.uk?ll=55,-4">Text</a>
,则 Google 地图页面为全屏且没有后退按钮。
那么我怎样才能在地图上使用参数而不是全屏,但保留底部栏。
我不想使用 JavaScript API,因为我想提供 JavaScript 尚未提供的公共交通说明。
I'm using jQuery Mobile and linking from a web page to Google Maps (as an external link). I would like the bottom bar to be visible in the map so that the user can hit the back button.
This works if the link looks like this:
<a rel="external" target="_" href="http://maps.google.co.uk">Text</a>
However if its like this
<a rel="external" target="_" href="http://maps.google.co.uk?ll=55,-4">Text</a>
then the Google Map page is fullscreen and there is no back button.
So how can I use parameters with the map and NOT have full-screen, but retain the bottom bar.
I DONT want to use the JavaScript API as I want to provide instructions for public transport which are not available from JavaScript (yet).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,Mobile Safari 有一个特殊的地图 URL 方案,因此带有参数的引用将被重定向到 iOS 地图应用程序,而不是地图网站。有一些与此相关的开发人员文档 这里。
这似乎是错误的,因为您被排除在移动游猎之外,并且无法选择访问移动网站。这可能是一个错误,因为该行为仅在存在参数时才会发生。我想知道为什么会出现这种情况。
It turns out that Mobile Safari has a special URL scheme for maps, so that the reference with parameters is being redirected to the iOS maps application, rather than the maps web site. There is some developer documentation relating to this here.
This seems wrong as you're thrown out of mobile safari and don't have the option of going to the mobile site. It may be a bug, as the behaviour only occurs when there are parameters. I would like to know why this is the case.