我有一个小应用程序,提供当前位置:经度和纬度。 现在我必须浏览谷歌地图的经度和纬度。 请建议我该怎么做。
当前回答
如果你想在浏览器中打开谷歌地图:
http://maps.google.com/?q= < lat >、<液化天然气>
要在iOS移动设备上打开谷歌地图应用程序,请使用谷歌地图URL方案:
comgooglemaps: / / ?q = < lat >、<液化天然气>
要在Android上打开谷歌地图应用程序,使用geo: intent:
地理:< lat >, <液化天然气> ?z = <变焦>
其他回答
这种模式再次发生了变化(2018年10月23日)。请看Kushagr的最新回答。
这是一个带有标记的地图(通过aaronm的评论):
https://www.google.com/maps/?q=-15.623037,18.388672
对于一个旧的例子(没有标记):
https://www.google.com/maps/preview/@-15.623037,18.388672,8z
最古老的格式:
http://maps.google.com/maps?ll=-15.623037,18.388672&spn=65.61535,79.013672
在谷歌地球程序中找到您的位置,并单击“在谷歌地图中查看”图标。浏览器中的URL栏将显示您需要的URL。
打开以下url,并显示经纬度和缩放级别。
https://maps.google.com/?q=23.22,88.32&z=8
这些是有效的url:
http://maps.google.com/?q= < LAT >、<液化天然气>
https://maps.google.com/?q=<LAT>,<LNG>&ll=<LAT>,<LNG>&z=18
https://www.google.com/maps/@ < LAT >、<液化天然气> 16 z
https://maps.google.com/?q=<LAT>,<LNG>&z=16
虽然(对于热心的读者)这是谷歌(2017年8月22日)的最新消息:
地图的url 使用地图显示映射url 用搜索动作映射url
从谷歌
Search: When searching for a specific place, the resulting map puts a pin in the specified location and displays available place details. Important: The parameter api=1 identifies the version of Maps URLs this URL is intended for. This parameter is required in every request. The only valid value is 1. If api=1 is NOT present in the URL, all parameters are ignored and the default Google Maps app will launch, either in a browser or the Google Maps mobile app, depending on the platform in use (for example, https://www.google.com/maps).
截至今天(2014/09/23),我发现要在确切的地方(不是近似值)得到标记,你可以使用:
http://www.google.com/maps/place/49.46800006494457,17.11514008755796
此外,如果你想指定地图中心和缩放:
http://www.google.com/maps/place/49.46800006494457,17.11514008755796/@49.46800006494457,17.11514008755796,17z
如果你想使用卫星地图类型,那么追加/data=!3m1!1 e3
http://www.google.com/maps/place/49.46800006494457,17.11514008755796/@49.46800006494457,17.11514008755796,17z/data=!3m1!1e3
如果你想要地形视图的地图,然后追加/data=!3m1!4 b1
https://www.google.com/maps/place/49.46800006494457,17.11514008755796/@49.46800006494457,17.11514008755796,17z/data=!3m1!4b1
推荐文章
- 如何隐藏元素而不让他们在页面上占用空间?
- 我如何链接到谷歌地图与特定的经度和纬度?
- 防止跨度元件断行
- 如何防止滚动条重新定位网页?
- 如何在ReactJS中使用单选按钮?
- 如何将onload事件添加到div元素
- 对多行文本应用省略号
- 如何隐藏图像破碎的图标只使用CSS/HTML?
- 如何在两列中显示无序列表?
- 如何水平居中iframe ?
- 使用React变量语句插入HTML (JSX)
- 什么?”/"(点/斜杠)指的是在一个HTML文件的路径位置?
- 如何解决C:\fakepath?
- 如何在Angular 4+中使用html标签渲染字符串?
- 如何下载HTTP目录与所有文件和子目录,因为他们出现在在线文件/文件夹列表?