iPhone HTML link to maps.google.com that opens page in Mobile Safari, not Maps App

萝らか妹 提交于 2019-12-24 06:34:21

问题


On the iPhone, links of the form maps.google.com are opened by the google maps app, which is installed on every iPhone. (see: Apple URL scheme reference)

The mobile site of maps.google.com supports more functionality than the native maps app (like the transit layer).

Is there a way to formulate an html link that would cause safari to open the maps link in the browser instead of launching the native maps app?

Here's an example link that opens in the Maps App that I'd rather have opened by mobile Safari:

http://maps.google.com/maps?q=boston&lci=transit_comp


回答1:


use https instead of http.

https://maps.google.com/maps?q=boston&lci=transit_comp

EDIT:

You could also resolve the domain name yourself then use the IP address.

http://173.194.34.165/maps?q=boston&lci=transit_comp




回答2:


Try adding the variable &ui=maps to the end of your URL string.



来源:https://stackoverflow.com/questions/10154706/iphone-html-link-to-maps-google-com-that-opens-page-in-mobile-safari-not-maps-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!