iPhone HTML link to maps.google.com that opens pag

2019-08-08 21:47发布

问题:

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.