开发者

How to bypass googlemap native app while loading http://maps.google.com in web app?

开发者 https://www.devze.com 2023-02-20 07:13 出处:网络
I have a web app and want to show google map app when user clicks on his address. If i redirect the link to http://maps.google.com?q=amritsar#bmb=1, the iphone automatically redirects to iphone google

I have a web app and want to show google map app when user clicks on his address. If i redirect the link to http://maps.google.com?q=amritsar#bmb=1, the iphone automatically redirects to iphone google map native app.. And the problem here is there is no back button on google map app , so there is no开发者_运维百科 way to come back to my web app. So i want some way by which maps.google.com?q=amritsar#bmb=1 does not open native web app. but simply opens the url in iframe. I dont want to use google map apis to show the google map because it does not give the ui as that of maps.google.com in iphone.


Try using the link for the mobile version of Google Maps (without the maps subdomain) to avoid the redirect to Apple's native Maps app.

Use: http://google.com/maps/m?q=amritsar#bmb=1

Instead of: http://maps.google.com?q=amritsar#bmb=1


You could use

<iframe>
to simply include the google map in your web app page. Here's a minimal page that shows the use of the tag.

<html>
<body>
<h2>map</h2>
<iframe src="http://maps.google.com/?q=amritsar#bmb=1" width="50%" height="50%">
Your browser does not support iframes
</iframe>
</body>
</html>

I tested this on the iPad and it did not redirect to the native app.

0

精彩评论

暂无评论...
验证码 换一张
取 消