从超链接打开谷歌地图 [英] Open google maps from hyperlink

查看:887
本文介绍了从超链接打开谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设计一个网页,专门为Android用户,所以我在想,如果有,可以打开一个超链接的格式谷歌地图就像通话的功能,例如

 < A HREF =电话:0766551121>现在&LT打电话给我; / A>
 

解决方案

如果按打开谷歌地图你的意思是原生的Andr​​oid谷歌地图应用程序,而不是打开的链接,Android的浏览器,然后根据的Geo意图您可以使用下面的地理URI 的格式触发意图将打开装置上的谷歌地图应用到给定的位置或查询:

  • GEO:纬度,经度
  • GEO:纬度,经度Z =缩放
  • GEO:0,0 Q =我+街道+地址
  • GEO:0,0 Q =企业+ +附近城市

有关谷歌街景,你可以使用:

  • google.streetview:cbll =纬度,经度和放大器; CBP = 1,偏航俯仰,,,变焦和放大器; MZ = mapZoom

有关每个可用选项的详细信息,地理意图URI看到的第一个网址。

I am trying to design a webpage specially for android users so i was wondering if there is a hyper link format that can open up google maps just like the call function eg

<a href="tel:0766551121"> Call me now </a>

解决方案

If by "open up Google Maps" you mean the native Android Google Maps application instead of opening the link in the Android's browser then according to Geo Intents you can use the following Geo URI formats that trigger intents that will open the Google Maps application on the device to the given location or query:

  • geo:latitude,longitude
  • geo:latitude,longitude?z=zoom
  • geo:0,0?q=my+street+address
  • geo:0,0?q=business+near+city

For Google Streetview you can use:

  • google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom

For details on the available options for each geo intent URI see the first URL.

这篇关于从超链接打开谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆