在网上搜索了一段时间后,我找不到任何像这样的地址:

宾夕法尼亚大街东南1200号 华盛顿,哥伦比亚特区,20003年

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

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或PHP是首选或者任何有用的信息。


当前回答

我刚发现这个,喜欢分享。

在maps.google.com上搜索你的地址 点击右下角的齿轮图标 点击“共享或嵌入地图” 单击短url复选框,并将结果粘贴在href..

其他回答

这个怎么样?

https://maps.google.com/?q=1200宾夕法尼亚大道,华盛顿,哥伦比亚特区,20003

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

如果你有latong然后使用下面的URL

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

例子:maps.google.com/ ?噢= 38.882147,-76.99017

更新

截至2017年,谷歌现在有一个官方创建跨平台谷歌地图url的方式:

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

你可以使用链接

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

那么这个呢: http://support.google.com/maps/bin/answer.py?hl=en&answer=72644

2016年2月,:

我需要这样做基于客户端输入的数据库值,没有一个长/长生成器。谷歌最近很喜欢拉特/长。以下是我所学到的:

1 链接的开头是这样的: https://www.google.com/maps/place/

2 然后写上你的地址:

用“+”代替任何空格。 在城市的前面和后面加上逗号。 包括邮政/邮编和省/州。 将任何#替换为空。 将任意++或++++替换为单个+

3. 把地址放在“/”后面

4 然后在最后加上斜杠。

注意:结尾的斜杠很重要。在用户单击链接后,谷歌继续执行并向URL追加更多内容,并且在这个斜杠之后执行。

这个问题的工作示例:

https://www.google.ca/maps/place/1200+Pennsylvania+Ave+SE,+Washington,+DC+20003/

我希望这对你有所帮助。

这是我从谷歌地图的一篇文章中发现的:

Open Google Maps. Make sure the map or Street View image you'd like to embed shows up on the map. In the top left corner, click the main menu ​☰. Click Share or embed map. At the top of the box that appears, choose the Embed map tab. Choose the size you want, then copy the code and paste it into the source code of your website or blog. Note: If you're using Maps in Lite mode, you won't be able to embed a map. Keep in mind that traffic information and some other Maps info might not be available in the embedded map.

我刚发现这个,喜欢分享。

在maps.google.com上搜索你的地址 点击右下角的齿轮图标 点击“共享或嵌入地图” 单击短url复选框,并将结果粘贴在href..