如何将地址转换为Google Maps链接(NOT MAP) [英] How to convert an address into a Google Maps Link (NOT MAP)

查看:162
本文介绍了如何将地址转换为Google Maps链接(NOT MAP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网上查找(Google)一段时间后,我找不到任何需要地址的东西,例如:

1200 Pennsylvania Ave SE,
哥伦比亚特区华盛顿,20003


并将其转换为可点击的链接:

http://maps.google.com/maps?f=q&source=s_q&hl=zh-CN& ; q = 1200 +宾夕法尼亚+大道+ SE,+华盛顿+哥伦比亚+区+,+ 20003&安培; SLL = 37.0625,-95.677068&安培; SSPN = 44.118686,114.169922&安培,即= UTF8&安培; CD = 1&安培;地址解析= FT5MUQIdIDlp -w& split = 0& ll = 38.882147,-76.99017& spn = 0.01064,0.027874& z = 16& iwloc = A b $ b

jQuery或PHP首选或只是​​任何有用的信息。

解决方案

如何?



https://maps.google.com/?q=1200 Pennsylvania Ave SE,华盛顿哥伦比亚特区,20003

  https://maps.google.com/?q=term 

如果您lat-long,然后在URL下使用

  https://maps.google.com/?ll=latitude,longitude 

示例: maps.google.com/?ll=38.882147,-76.99017


$ b

更新



截至2017年,Google现在有一种官方的方式来创建跨平台的Google地图网址: b
$ b

https://developers.google.com/maps/documentation/urls/guide



您可以使用链接,如



https://www.google.com/maps/search/?api=1&query=1200%20Pennsylvania%20Ave%20SE%2C%20Washington%2C% 20%20%%20Columbia%2C%2020003


After looking (Googling) on the web for a while I can find nothing that takes a address like:

1200 Pennsylvania Ave SE, Washington, District of Columbia, 20003

and converts it into a clickable link:

http://maps.google.com/maps?f=q&source=s_q&hl=en&q=1200+Pennsylvania+Ave+SE,+Washington,+District+of+Columbia,+20003&sll=37.0625,-95.677068&sspn=44.118686,114.169922&ie=UTF8&cd=1&geocode=FT5MUQIdIDlp-w&split=0&ll=38.882147,-76.99017&spn=0.01064,0.027874&z=16&iwloc=A

jQuery or PHP preferred or just any useful information on this.

解决方案

How about this?

https://maps.google.com/?q=1200 Pennsylvania Ave SE, Washington, District of Columbia, 20003

https://maps.google.com/?q=term

If you have lat-long then use below URL

https://maps.google.com/?ll=latitude,longitude

Example: maps.google.com/?ll=38.882147,-76.99017

UPDATE

As of year 2017, Google now has an official way to create cross-platform Google Maps URLs:

https://developers.google.com/maps/documentation/urls/guide

You can use links like

https://www.google.com/maps/search/?api=1&query=1200%20Pennsylvania%20Ave%20SE%2C%20Washington%2C%20District%20of%20Columbia%2C%2020003

这篇关于如何将地址转换为Google Maps链接(NOT MAP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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